Skip to content

Commit

Permalink
make .+ and .- parse as operators. also .+= and .-=
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jul 9, 2012
1 parent 6992e59 commit 02f5cc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(define ops-by-prec
'#((= := += -= *= /= //= .//= .*= ./= |\\=| |.\\=| ^= .^= %= |\|=| &= $= => <<= >>= >>>= ~)
'#((= := += -= *= /= //= .//= .*= ./= |\\=| |.\\=| ^= .^= %= |\|=| &= $= => <<= >>= >>>= ~ |.+=| |.-=|)
(?)
(|\|\||)
(&&)
Expand All @@ -9,7 +9,7 @@
(<- -- -->)
(> < >= <= == === != |.>| |.<| |.>=| |.<=| |.==| |.!=| |.=| |.!| |<:| |>:|)
(: |..|)
(+ - |\|| $)
(+ - |.+| |.-| |\|| $)
(<< >> >>>)
(* / |./| % & |.*| |\\| |.\\|)
(// .//)
Expand Down
2 changes: 2 additions & 0 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,8 @@
(pattern-lambda (.//= a b) (expand-update-operator '.// a b))
(pattern-lambda (|\\=| a b) (expand-update-operator '|\\| a b))
(pattern-lambda (|.\\=| a b) (expand-update-operator '|.\\| a b))
(pattern-lambda (|.+=| a b) (expand-update-operator '|.+| a b))
(pattern-lambda (|.-=| a b) (expand-update-operator '|.-| a b))
(pattern-lambda (^= a b) (expand-update-operator '^ a b))
(pattern-lambda (.^= a b) (expand-update-operator '.^ a b))
(pattern-lambda (%= a b) (expand-update-operator '% a b))
Expand Down

0 comments on commit 02f5cc3

Please sign in to comment.