Vixen
dd8b0a81

ForSyntax

class
csharp
public sealed class ForSyntax

@for (var i in sequence) { … } — the keyed reconciler's input.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

This node is associated with the following syntax kinds:

For

Fields and properties (12)

  • public SyntaxToken ForKeyword
  • public SyntaxToken OpenParenToken
  • public SyntaxToken VarKeyword
  • public SyntaxToken Identifier
  • public SyntaxToken? CommaToken

    The , before an index name, absent when the loop declares none.

  • public SyntaxToken? Index

    The name bound to the row's position, from @for (var row, i in Rows). ⚠ It is a Signal<int> rather than an int, because a surviving key keeps its region and its body is never re-run — so a captured position would be a lie from the first reorder.

  • public SyntaxToken InKeyword
  • public SyntaxToken Sequence
  • public SyntaxToken CloseParenToken
  • public MarkupBlockSyntax Body
  • public SyntaxToken? EmptyKeyword

    The @empty of @for (…) { … } @empty { … }, absent when the loop declares no fallback arm.

  • public MarkupBlockSyntax? EmptyBody

    What the loop draws instead of rows. ⚠ Two fields rather than the clause node else has: an else chains — its body is an IfSyntax for else if — and an @empty cannot, so a node of its own would buy a public type and no structure.

Methods (16)

Used by (8)

  • BinderVixen.Ui.Markup
  • ForSyntaxVixen.Ui.Markup
  • ParserTestsVixen.Ui.Markup.Tests
  • SyntaxFactoryVixen.Ui.Markup
  • SyntaxRewriterVixen.Ui.Markup
  • SyntaxVisitorVixen.Ui.Markup
  • SyntaxVisitorVixen.Ui.Markup
  • VxmlParserVixen.Ui.Markup