Commit e2bf4507 authored by John van Groningen's avatar John van Groningen

Merge branch 'allow-underscore-idents-in-hierarchical-underscore-modules' into 'master'

Allow the use of underscore identifiers in hierarchical modules of which any element starts with an underscore

See merge request clean-compiler-and-rts/compiler!10
parents 2497e35e 7c37d030
......@@ -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