mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-30 13:42:24 +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,
|
span,
|
||||||
} = token
|
} = token
|
||||||
{
|
{
|
||||||
|
if name.starts_with('_') {
|
||||||
|
return Err(SyntaxError::invalid_ident_name(&name, &name[1..name.len()], &span));
|
||||||
|
}
|
||||||
|
|
||||||
Ok(Identifier { name, span })
|
Ok(Identifier { name, span })
|
||||||
} else {
|
} else {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
|
Loading…
Reference in New Issue
Block a user