Verified Commit 7c37d030 authored by Camil Staps's avatar Camil Staps

Allow all modules of which the filename starts with an underscore to use...

Allow all modules of which the filename starts with an underscore to use identifiers starting with an underscore
parent 2497e35e
......@@ -339,11 +339,18 @@ where
= (False, mod_type, "", tokenBack scanState)
try_module_name (IdentToken name) mod_type scanState
= (True, mod_type, name, scanState)
# allow_underscores = file_name_starts_with_underscore (size name-1) name
= (True, mod_type, name, setUseUnderscoreIdents allow_underscores scanState)
try_module_name (UnderscoreIdentToken name) mod_type scanState
= (True, mod_type, name, setUseUnderscoreIdents True scanState)
# allow_underscores = file_name_starts_with_underscore (size name-1) name
= (True, mod_type, name, setUseUnderscoreIdents allow_underscores scanState)
try_module_name token mod_type scanState
= (False, mod_type, "", tokenBack scanState)
file_name_starts_with_underscore i s
| i>=0 && s.[i]<>'.'
= file_name_starts_with_underscore (i-1) s
= i+1<size s && s.[i+1]=='_'
verify_name name id_name file_name pState
| name == id_name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment