Skip to main content

Module parser

Module parser 

Source
Expand description

§GRAMMAR

opComp   => '=' | '<' | '>' | '<=' } '>=' | '<>'
opFactor => '*' | '/'
unaryOp  => '-' | '+'

expr    => concat (opComp concat)*
concat  => term ('&' term)*
term    => factor (opFactor factor)*
factor  => prod (opProd prod)*
prod    => power ('^' power)*
power   => (unaryOp)* range '%'*
range   => implicit (':' primary)?
implicit=> '@' primary | primary '#' | primary
primary => '(' expr ')'
        => number
        => function '(' f_args ')'
        => LAMBDA '(' f_args ')' '(' f_args ')'
        => name
        => string
        => '{' a_args '}'
        => bool
        => bool()
        => error

f_args  => e (',' e)*

Modules§

move_formula
static_analysis
stringify

Structs§

CompletionContext
What the grammar accepts at a cursor position, plus the span the UI should replace when it inserts a completion. Returned by Parser::parse_at_cursor.
NamedVariable
Parser

Enums§

ArrayNode
ExpectedTokens
Node

Functions§

new_parser_english

Type Aliases§

DefinedNameS