From 837b1c76a4b05761c9fb94550b0e5b0b20ccb31a Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sat, 3 Sep 2022 13:19:47 -0400 Subject: [PATCH] Parser is more restrictive of phrase commands --- parser/phrase.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parser/phrase.go b/parser/phrase.go index 080c98c..da0f8d5 100644 --- a/parser/phrase.go +++ b/parser/phrase.go @@ -51,8 +51,10 @@ func isTokenOperator (token lexer.Token) (isOperator bool) { // validPhraseStartTokens lists all tokens that are expected when parsing the // first part of a phrase. var validPhraseStartTokens = append ( - validArgumentStartTokens, - operatorTokens...) + operatorTokens, + lexer.TokenKindLBracket, + lexer.TokenKindName, + lexer.TokenKindString) // validBlockLevelPhraseTokens lists all tokens that are expected when parsing // a block level phrase.