public ICleanUpSourceSettings CreateSettings(bool useSegmentLocker = false, bool useContentLocker = false, bool useStructureLocker = false, SegmentLockItem segmentLockItem = null, ContextDef contextDef = null, bool backGroundColor = false, bool bold = false, bool fontNameSize = false, bool italic = false, bool strikeThrough = false, bool textColor = false, bool textDirection = false, bool textPosition = false, bool underLine = false) { var settings = Substitute.For <ICleanUpSourceSettings>(); settings.UseSegmentLocker = useSegmentLocker; settings.UseContentLocker = useContentLocker; settings.UseStructureLocker = useStructureLocker; settings.SegmentLockList = new BindingList <SegmentLockItem>(new List <SegmentLockItem>() { segmentLockItem }); settings.StructureLockList = new List <ContextDef>() { contextDef }; return(settings); }
void ParseContextItem(ContextDef parent) { PushNode(parent); ExprSeq exprSeq = ParseExprSeq(ParseFlag.ParseLines); //parent.ExprSeq = expr; parent.CreateTopicDef(exprSeq); PopNode(); }
void ParseContext(AstNode parent) { Advance();//past 'context Token name = CurrentToken; RootBlock.AddEntityDef(new EntityDef(name)); Advance();//past name // ContextDef def = new ContextDef(name); parent.AddChild(def); // do { CreateState(CurrentList); ParseContextItem(def); PopState(); } while (Advance()); }
void ParseContextDecorator(AstNode parent) { ContextDecoratorDef contextDecDef = new ContextDecoratorDef(); CreateState(CurrentList); ContextDef contextDef = new ContextDef(CurrentToken); contextDecDef.ContextDef = contextDef; switch (CurrentToken.Kind) { case TokenKind.PlusPlus: contextDef.ContextDefKind = ContextDefKind.Next; break; } PopState(); Advance(); //past [..] ParseRhsItem(contextDecDef); parent.AddChild(contextDecDef); }
public void PushContextDef(ContextDef def) { ContextDefStack.Push(def); }