mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-28 01:01:53 +03:00
do not allow _ at start of identifier
This commit is contained in:
parent
0663227741
commit
8c996fb15d
@ -302,6 +302,10 @@ impl ParserContext {
|
||||
span,
|
||||
} = token
|
||||
{
|
||||
if name.starts_with('_') {
|
||||
return Err(SyntaxError::invalid_ident_name(&name, &name[1..name.len()], &span));
|
||||
}
|
||||
|
||||
Ok(Identifier { name, span })
|
||||
} else {
|
||||
unimplemented!()
|
||||
|
Loading…
Reference in New Issue
Block a user