File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ class TokenStream {
3535
3636 public function consumeConstIdent (): TokenTree {
3737 switch (token ()) {
38+ case Dollar (_ ): return consumeToken ();
3839 case Const (CIdent (_ )): return consumeToken ();
3940 default : error (' bad token ${token ()} != Const(CIdent(_))' );
4041 }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class TokenTreeBuilderParsingTest extends haxe.unit.TestCase {
2121 assertCodeParses (ISSUE_252 );
2222 assertCodeParses (ISSUE_253 );
2323 assertCodeParses (ISSUE_256 );
24+ assertCodeParses (DOLLAR_TOKEN_AS_VAR_NAME );
2425 }
2526
2627 public function assertCodeParses (code : String , ? pos : PosInfos ) {
@@ -158,4 +159,11 @@ abstract TokenTreeBuilderParsingTests(String) to String {
158159 }
159160 }" ;
160161
162+ var DOLLAR_TOKEN_AS_VAR_NAME = "
163+ class Test {
164+ function foo() {
165+ macro var $componentVarName = new $typePath();
166+ }
167+ }" ;
168+
161169}
You can’t perform that action at this time.
0 commit comments