Reserve double-underscore identifiers for internal use
This commit is contained in:
1 parent
64974cc1e2
commit
d10e982fc8
1 file changed
+2
-1
@@ -2,7 +2,8 @@ class Propane
|
|||||||
|
|
||||||
class Grammar
|
class Grammar
|
||||||
|
|
||||||
IDENTIFIER_REGEX = /[a-zA-Z_][a-zA-Z_0-9]*/
|
# Reserve identifiers beginning with a double-underscore for internal use.
|
||||||
|
IDENTIFIER_REGEX = /(?:[a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z_0-9]*/
|
||||||
|
|
||||||
attr_reader :classname
|
attr_reader :classname
|
||||||
attr_reader :modulename
|
attr_reader :modulename
|
||||||
|
|||||||
Reference in new issue
Block a user