| ... | ... | @@ -22,6 +22,8 @@ pub const Node = struct { |
| 22 | 22 | StringLiteral, |
| 23 | 23 | MultilineStringLiteral, |
| 24 | 24 | CharLiteral, |
| 25 | BoolLiteral, |
| 26 | NullLiteral, |
| 25 | 27 | UndefinedLiteral, |
| 26 | 28 | BuiltinCall, |
| 27 | 29 | Call, |
| ... | ... | @@ -44,6 +46,8 @@ pub const Node = struct { |
| 44 | 46 | Id.StringLiteral => @fieldParentPtr(NodeStringLiteral, "base", base).iterate(index), |
| 45 | 47 | Id.MultilineStringLiteral => @fieldParentPtr(NodeMultilineStringLiteral, "base", base).iterate(index), |
| 46 | 48 | Id.CharLiteral => @fieldParentPtr(NodeCharLiteral, "base", base).iterate(index), |
| 49 | Id.BoolLiteral => @fieldParentPtr(NodeBoolLiteral, "base", base).iterate(index), |
| 50 | Id.NullLiteral => @fieldParentPtr(NodeNullLiteral, "base", base).iterate(index), |
| 47 | 51 | Id.UndefinedLiteral => @fieldParentPtr(NodeUndefinedLiteral, "base", base).iterate(index), |
| 48 | 52 | Id.BuiltinCall => @fieldParentPtr(NodeBuiltinCall, "base", base).iterate(index), |
| 49 | 53 | Id.Call => @fieldParentPtr(NodeCall, "base", base).iterate(index), |
| ... | ... | @@ -67,6 +71,8 @@ pub const Node = struct { |
| 67 | 71 | Id.StringLiteral => @fieldParentPtr(NodeStringLiteral, "base", base).firstToken(), |
| 68 | 72 | Id.MultilineStringLiteral => @fieldParentPtr(NodeMultilineStringLiteral, "base", base).firstToken(), |
| 69 | 73 | Id.CharLiteral => @fieldParentPtr(NodeCharLiteral, "base", base).firstToken(), |
| 74 | Id.BoolLiteral => @fieldParentPtr(NodeBoolLiteral, "base", base).firstToken(), |
| 75 | Id.NullLiteral => @fieldParentPtr(NodeNullLiteral, "base", base).firstToken(), |
| 70 | 76 | Id.UndefinedLiteral => @fieldParentPtr(NodeUndefinedLiteral, "base", base).firstToken(), |
| 71 | 77 | Id.BuiltinCall => @fieldParentPtr(NodeBuiltinCall, "base", base).firstToken(), |
| 72 | 78 | Id.Call => @fieldParentPtr(NodeCall, "base", base).firstToken(), |
| ... | ... | @@ -90,6 +96,8 @@ pub const Node = struct { |
| 90 | 96 | Id.StringLiteral => @fieldParentPtr(NodeStringLiteral, "base", base).lastToken(), |
| 91 | 97 | Id.MultilineStringLiteral => @fieldParentPtr(NodeMultilineStringLiteral, "base", base).lastToken(), |
| 92 | 98 | Id.CharLiteral => @fieldParentPtr(NodeCharLiteral, "base", base).lastToken(), |
| 99 | Id.BoolLiteral => @fieldParentPtr(NodeBoolLiteral, "base", base).lastToken(), |
| 100 | Id.NullLiteral => @fieldParentPtr(NodeNullLiteral, "base", base).lastToken(), |
| 93 | 101 | Id.UndefinedLiteral => @fieldParentPtr(NodeUndefinedLiteral, "base", base).lastToken(), |
| 94 | 102 | Id.BuiltinCall => @fieldParentPtr(NodeBuiltinCall, "base", base).lastToken(), |
| 95 | 103 | Id.Call => @fieldParentPtr(NodeCall, "base", base).lastToken(), |
| ... | ... | @@ -629,6 +637,40 @@ pub const NodeCharLiteral = struct { |
| 629 | 637 | } |
| 630 | 638 | }; |
| 631 | 639 | |
| 640 | pub const NodeBoolLiteral = struct { |
| 641 | base: Node, |
| 642 | token: Token, |
| 643 | |
| 644 | pub fn iterate(self: &NodeBoolLiteral, index: usize) ?&Node { |
| 645 | return null; |
| 646 | } |
| 647 | |
| 648 | pub fn firstToken(self: &NodeBoolLiteral) Token { |
| 649 | return self.token; |
| 650 | } |
| 651 | |
| 652 | pub fn lastToken(self: &NodeBoolLiteral) Token { |
| 653 | return self.token; |
| 654 | } |
| 655 | }; |
| 656 | |
| 657 | pub const NodeNullLiteral = struct { |
| 658 | base: Node, |
| 659 | token: Token, |
| 660 | |
| 661 | pub fn iterate(self: &NodeNullLiteral, index: usize) ?&Node { |
| 662 | return null; |
| 663 | } |
| 664 | |
| 665 | pub fn firstToken(self: &NodeNullLiteral) Token { |
| 666 | return self.token; |
| 667 | } |
| 668 | |
| 669 | pub fn lastToken(self: &NodeNullLiteral) Token { |
| 670 | return self.token; |
| 671 | } |
| 672 | }; |
| 673 | |
| 632 | 674 | pub const NodeUndefinedLiteral = struct { |
| 633 | 675 | base: Node, |
| 634 | 676 | token: Token, |