nay 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/nay/lexer.rb +1 -1
- data/lib/nay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7aa4e8a6e59c35d02dac84443aa109593f4c16ea23298d3bbbcd4e0c7c7baf5
|
4
|
+
data.tar.gz: ee9d6518d6597bc1a68ef2d3a4261ced357b86a32b0482565dd44ca811dea2d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e79219112b550df70baa420a7070ee3cc2766b906e535fdf6d8f84e10451f65173e8624b0a71778d4d80acef017ef2b588a3e21993826933ba000266ef18319f
|
7
|
+
data.tar.gz: 778e6dd6a679833a2cdeefb327f5d84f2aacabf74aee750085e02c318dc8781369281dbcdd1a155f30e5a0ba228f5d91ce953cd17f6113b8ba47af07631945dc
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@ This would set `compiled` to: `# yields: 'A quick fox jumps over the fence!'`
|
|
39
39
|
Notes:
|
40
40
|
|
41
41
|
* Tokens are passed through #[] method for the passed in object. Any object providing a brackets interface will work.
|
42
|
-
*
|
42
|
+
* A valid token only contains the following characters: [a-zA-Z0-9_-]. If a token needs to contain something not in that list then qualify it with double quotes (i.e. `hello, << person."first name" >>`)
|
43
43
|
|
44
44
|
## Contributing
|
45
45
|
|
data/lib/nay/lexer.rb
CHANGED
@@ -77,7 +77,7 @@ module Nay
|
|
77
77
|
elsif scanner.scan(/"/)
|
78
78
|
state.push(EXPRESSION_LITERAL)
|
79
79
|
token = Token.new(OPEN_EXPRESSION_LITERAL, scanner.matched)
|
80
|
-
elsif scanner.scan_until(/[a-zA-Z0-
|
80
|
+
elsif scanner.scan_until(/[a-zA-Z0-9_-]*?(?=\s|\.|>>)/m)
|
81
81
|
token = Token.new(IDENTIFIER, scanner.matched)
|
82
82
|
else
|
83
83
|
scanner.terminate
|
data/lib/nay/version.rb
CHANGED