File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -593,6 +593,10 @@ private Expression primary()
593593 {
594594 return element ( ) ;
595595 }
596+ if ( lookMatch ( 0 , TokenType . DOG ) )
597+ {
598+ return dog ( ) ;
599+ }
596600 if ( match ( TokenType . WORD ) )
597601 {
598602 return new ConstantExpression ( current . getText ( ) ) ;
@@ -610,6 +614,15 @@ private Expression primary()
610614 throw new Exception ( "unknown expression" ) ;
611615 }
612616
617+ private DogExpression dog ( )
618+ {
619+ consume ( TokenType . DOG ) ;
620+ consume ( TokenType . LDEF ) ;
621+ List < string > argNames = new List < string > ( ) ;
622+ Statement body = statementOrBlock ( ) ;
623+ return new DogExpression ( new LdefExpression ( body , argNames ) ) ;
624+ }
625+
613626 private Expression element ( )
614627 {
615628 string variable = consume ( TokenType . WORD ) . getText ( ) ;
You can’t perform that action at this time.
0 commit comments