Skip to content

Commit

Permalink
change square brackets to parenthesis and add missing wildcard (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrcarneiro authored Feb 14, 2023
1 parent 1f05da7 commit 5e8523d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions _examples/expr2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ type Expression struct {

type Equality struct {
Comparison *Comparison `@@`
Op string `[ @( "!" "=" | "=" "=" )`
Next *Equality ` @@ ]`
Op string `( @( "!" "=" | "=" "=" )`
Next *Equality ` @@ )*`
}

type Comparison struct {
Addition *Addition `@@`
Op string `[ @( ">" | ">" "=" | "<" | "<" "=" )`
Next *Comparison ` @@ ]`
Op string `( @( ">" | ">" "=" | "<" | "<" "=" )`
Next *Comparison ` @@ )*`
}

type Addition struct {
Multiplication *Multiplication `@@`
Op string `[ @( "-" | "+" )`
Next *Addition ` @@ ]`
Op string `( @( "-" | "+" )`
Next *Addition ` @@ )*`
}

type Multiplication struct {
Unary *Unary `@@`
Op string `[ @( "/" | "*" )`
Next *Multiplication ` @@ ]`
Op string `( @( "/" | "*" )`
Next *Multiplication ` @@ )*`
}

type Unary struct {
Expand Down

0 comments on commit 5e8523d

Please sign in to comment.