feat: detect pointer operators
This commit is contained in:
@@ -91,7 +91,8 @@ object parser {
|
||||
`<ident-or-array-elem>`,
|
||||
Parens("(" ~> `<expr>` <~ ")")
|
||||
)
|
||||
private val `<ident>` = Ident(ident)
|
||||
private val `<ident>` =
|
||||
Ident(ident) | some("*" | "&").verifiedExplain("pointer operators are not allowed")
|
||||
private lazy val `<ident-or-array-elem>` =
|
||||
`<ident>` <**> (`<array-indices>` </> identity)
|
||||
private val `<array-indices>` = ArrayElem(some("[" ~> `<expr>` <~ "]"))
|
||||
|
Reference in New Issue
Block a user