これは私のパーサーです
def assstm: Parser[Any] = indexop ~ ":=" ~ expression ~ ";"
def indexop: Parser[Any] = ident ~ "[" ~ expression ~ "]"
myArray[5] := 5 にエラーがあります
``('' expected but `[' found
しかし、このパーサーでは
def assstm: Parser[Any] = indexop ~ ":=" ~ expression ~ ";"
def indexop: Parser[Any] = "[" ~ expression ~ "]"
[5] := 5 でテストしましたが、エラーはありません。
何が起こっている?