pub enum Goal {
Div,
RegExp,
TemplateTail,
RegExpOrTemplateTail,
}Expand description
Which of the lexical grammar’s goal symbols to read the next token
with. The grammar is ambiguous without one: / divides after an
expression and starts a regular expression anywhere else, and }
closes a block unless it ends a template substitution. The parser
knows which; the lexer is told and never guesses.
Variants§
Div
InputElementDiv: / and /= are punctuators, } is a punctuator.
RegExp
InputElementRegExp: / starts a regular expression.
TemplateTail
InputElementTemplateTail: } starts a TemplateMiddle or TemplateTail.
RegExpOrTemplateTail
InputElementRegExpOrTemplateTail: both.
Trait Implementations§
impl Copy for Goal
impl Eq for Goal
impl StructuralPartialEq for Goal
Auto Trait Implementations§
impl Forget for Goal
impl Freeze for Goal
impl Move for Goal
impl RefUnwindSafe for Goal
impl Send for Goal
impl Sync for Goal
impl Unpin for Goal
impl UnsafeUnpin for Goal
impl UnwindSafe for Goal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more