@@ -447,6 +447,8 @@ private Node parseForStatement() {
447
447
*/
448
448
private Node parseSubroutineCall () {
449
449
// Parse the subroutine name as a complex identifier
450
+ // Alternately, this could be a v-string like v10.20.30 XXX TODO
451
+
450
452
String subName = parseSubroutineIdentifier ();
451
453
ctx .logDebug ("SubroutineCall subName `" + subName + "` package " + ctx .symbolTable .getCurrentPackage ());
452
454
if (subName == null ) {
@@ -527,6 +529,10 @@ private Node parseIfStatement() {
527
529
* Parses an expression based on operator precedence.
528
530
* <p>
529
531
* Higher precedence means tighter: `*` has higher precedence than `+`
532
+ * <p>
533
+ * Explanation of the <a href="https://en.wikipedia.org/wiki/Operator-precedence_parser">precedence climbing method</a>
534
+ * can be found in Wikipedia.
535
+ * </p>
530
536
*
531
537
* @param precedence The precedence level of the current expression.
532
538
* @return The root node of the parsed expression.
@@ -656,7 +662,7 @@ private Node parsePrimary() {
656
662
}
657
663
return new OperatorNode ("eval" , operand , tokenIndex );
658
664
case "do" :
659
- // Handle 'do' keyword which can be followed by a block
665
+ // Handle 'do' keyword which can be followed by a block or filename
660
666
token = peek ();
661
667
if (token .type == LexerTokenType .OPERATOR && token .text .equals ("{" )) {
662
668
consume (LexerTokenType .OPERATOR , "{" );
@@ -679,7 +685,7 @@ private Node parsePrimary() {
679
685
// Handle special-quoted domain-specific arguments
680
686
return parseRawString (token .text );
681
687
default :
682
- // Handle any other identifier as an identifier node
688
+ // Handle any other identifier as a subroutine call or identifier node
683
689
tokenIndex = startIndex ; // re-parse
684
690
return parseSubroutineCall ();
685
691
}
0 commit comments