mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Correct the precedence of load.
This commit is contained in:
parent
3b6741456d
commit
ac3f487703
@ -50,7 +50,7 @@ core :: (TokenParsing m, Monad m) => m (Term Core User)
|
||||
core = expr
|
||||
|
||||
expr :: (TokenParsing m, Monad m) => m (Term Core User)
|
||||
expr = ifthenelse <|> lambda <|> rec <|> assign
|
||||
expr = ifthenelse <|> lambda <|> rec <|> load <|> assign
|
||||
|
||||
assign :: (TokenParsing m, Monad m) => m (Term Core User)
|
||||
assign = application <**> (flip (Core..=) <$ symbolic '=' <*> application <|> pure id) <?> "assignment"
|
||||
@ -64,7 +64,6 @@ projection = foldl' (Core....) <$> atom <*> many (namedValue <$> (dot *> name))
|
||||
atom :: (TokenParsing m, Monad m) => m (Term Core User)
|
||||
atom = choice
|
||||
[ comp
|
||||
, load
|
||||
, lit
|
||||
, ident
|
||||
, parens expr
|
||||
|
@ -71,7 +71,7 @@ prettyCore style = precBody . go . fmap name
|
||||
, keyword "else" <+> precBody (go fal)
|
||||
]
|
||||
|
||||
Load p -> prec 8 (keyword "load" <+> withPrec 9 (go p))
|
||||
Load p -> prec 3 (keyword "load" <+> withPrec 9 (go p))
|
||||
item :. body -> prec 9 (withPrec 9 (go item) <> symbol "." <> name body)
|
||||
|
||||
lhs := rhs -> prec 3 . group . nest 2 $ vsep
|
||||
|
Loading…
Reference in New Issue
Block a user