twostroke 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/twostroke/tokens.rb +1 -1
- metadata +1 -1
data/lib/twostroke/tokens.rb
CHANGED
@@ -11,7 +11,7 @@ module Twostroke
|
|
11
11
|
*%w(function var if instanceof in else for while do this return throw typeof try catch finally void null new).map do |w|
|
12
12
|
[ w.upcase.intern, /#{w}(?=[^a-zA-Z_0-9])/ ]
|
13
13
|
end,
|
14
|
-
[ :BAREWORD, /[a-zA-Z_][a-zA-Z_0-9]*/, ->m { m[0] } ],
|
14
|
+
[ :BAREWORD, /[a-zA-Z_\$][\$a-zA-Z_0-9]*/, ->m { m[0] } ],
|
15
15
|
|
16
16
|
[ :STRING, /(["'])((\\.|[^\1])*?[^\1\\]?)\1/, ->m do
|
17
17
|
m[2].gsub(/\\([bfnrt])/) { |m|
|