public override void CreateSyntax(Tree.Component owner, MarkdownLexer.Token reference, CreateSyntaxResult result) { if (reference is MarkdownLexer.NewLine) { new NewLine(owner, reference, reference); } }
public override void CreateSyntax(Tree.Component owner, Tree.Syntax reference, CreateSyntaxResult result) { if (reference is MarkdownLexer.FileText referenceFileText) { var page = new Page((Document)owner, referenceFileText); result.CreateSyntaxTree(page, reference.NextAll); } }
public override void CreateSyntax(Tree.Component owner, Tree.Syntax reference, CreateSyntaxResult result) { if (reference is Storage.FileText referenceFileText) { var fileText = new FileText((Document)owner, referenceFileText); result.CreateSyntaxTree(fileText, reference.NextAll); } }
public override void CreateSyntax(Tree.Component owner, MarkdownLexer.Token reference, CreateSyntaxResult result) { if (owner.Last is Content content) { content.Remove(); new Content(owner, content.ReferenceBegin, reference); } else { new Content(owner, reference, reference); } }
public override void CreateSyntax(Tree.Component owner, MarkdownLexer.Token reference, CreateSyntaxResult result) { if (reference is MarkdownLexer.Header tokenHeader) { // Previous bool isNull = tokenHeader.Previous == null; bool isSpace = tokenHeader.Previous is MarkdownLexer.Space && (tokenHeader.Previous.Previous == null || tokenHeader.Previous.Previous is MarkdownLexer.NewLine); bool isNewLine = tokenHeader.Previous is MarkdownLexer.NewLine; if (isNull || isSpace || isNewLine) { var header = new Header(owner, reference); result.CreateSyntaxTree(header, reference.Next, SyntaxFactoryStopList()); } } }
public override void CreateSyntax(Tree.Component owner, MarkdownLexer.Token reference, CreateSyntaxResult result) { if (reference is MarkdownLexer.Comment comment && comment.IsEnd == false) { MarkdownLexer.Token referenceNext = reference; while ((referenceNext = referenceNext.Next) != null) { if (referenceNext is MarkdownLexer.Comment commentNext && commentNext.IsEnd) { new Comment(owner, reference, referenceNext); break; } } } }
public override void CreateSyntax(Tree.Component owner, MarkdownLexer.Token reference, CreateSyntaxResult result) { if (reference is MarkdownLexer.Special specialOpen && specialOpen.Text == "[") { if (reference.Next is MarkdownLexer.Content contentLinkUrl) { if (reference.Next?.Next is MarkdownLexer.Special specialClose && specialClose.Text == "]") { if (reference.Next?.Next?.Next is MarkdownLexer.Special specialOpen2 && specialOpen2.Text == "(") { if (reference.Next?.Next?.Next?.Next is MarkdownLexer.Content contentLinkText) { if (reference.Next?.Next?.Next?.Next?.Next is MarkdownLexer.Special specialClose2 && specialClose2.Text == ")") { new Link(owner, reference, specialClose2, LinkUrl, LinkText); } } } } } } }
public Comment(Tree.Component owner, MarkdownLexer.Token referenceBegin, MarkdownLexer.Token referenceEnd) : base(owner, referenceBegin, referenceEnd) { }
public virtual void CreateSyntax(Tree.Component owner, MarkdownLexer.Token reference, CreateSyntaxResult result) { }
public override void CreateSyntax(Tree.Component owner, Tree.Syntax reference, CreateSyntaxResult result) { CreateSyntax(owner, (MarkdownLexer.Token)reference, result); }
public Node(Tree.Component owner, MarkdownLexer.Token reference) : base(owner, reference) { }
public override void CreateSyntax(Tree.Component owner, Tree.Syntax reference, CreateSyntaxResult result) { CreateSyntax((FileText)owner, (Storage.Character)reference, result); }
public Link(Tree.Component owner, MarkdownLexer.Token referenceBegin, MarkdownLexer.Token referenceEnd, MarkdownLexer.Content linkUrl, MarkdownLexer.Content linkText) : base(owner, referenceBegin, referenceEnd) { LinkUrl = linkUrl; LinkText = linkText; }