1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-23 13:46:52 +00:00

Update grammar

This commit is contained in:
Calvin Rose 2018-12-16 21:30:58 -05:00
parent 22e49bc0fc
commit f7a25ecae3
2 changed files with 20 additions and 15 deletions

View File

@ -55,6 +55,14 @@
<key>include</key> <key>include</key>
<string>#readermac</string> <string>#readermac</string>
</dict> </dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#longstring</string>
</dict>
<dict> <dict>
<key>include</key> <key>include</key>
<string>#literal</string> <string>#literal</string>
@ -83,14 +91,6 @@
<key>include</key> <key>include</key>
<string>#symbol</string> <string>#symbol</string>
</dict> </dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#longstring</string>
</dict>
</array> </array>
</dict> </dict>
<key>comment</key> <key>comment</key>
@ -261,7 +261,7 @@
<string>(@?")</string> <string>(@?")</string>
<key>beginCaptures</key> <key>beginCaptures</key>
<dict> <dict>
<key>0</key> <key>1</key>
<dict> <dict>
<key>name</key> <key>name</key>
<string>punctuation.definition.string.begin.janet</string> <string>punctuation.definition.string.begin.janet</string>
@ -271,7 +271,7 @@
<string>(")</string> <string>(")</string>
<key>endCaptures</key> <key>endCaptures</key>
<dict> <dict>
<key>0</key> <key>1</key>
<dict> <dict>
<key>name</key> <key>name</key>
<string>punctuation.definition.string.end.janet</string> <string>punctuation.definition.string.end.janet</string>
@ -292,20 +292,25 @@
<key>longstring</key> <key>longstring</key>
<dict> <dict>
<key>begin</key> <key>begin</key>
<string>@?(`+)</string> <string>(@?)(`+)</string>
<key>beginCaptures</key> <key>beginCaptures</key>
<dict> <dict>
<key>0</key> <key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.janet</string>
</dict>
<key>2</key>
<dict> <dict>
<key>name</key> <key>name</key>
<string>punctuation.definition.string.begin.janet</string> <string>punctuation.definition.string.begin.janet</string>
</dict> </dict>
</dict> </dict>
<key>end</key> <key>end</key>
<string>\1</string> <string>\2</string>
<key>endCaptures</key> <key>endCaptures</key>
<dict> <dict>
<key>0</key> <key>1</key>
<dict> <dict>
<key>name</key> <key>name</key>
<string>punctuation.definition.string.end.janet</string> <string>punctuation.definition.string.end.janet</string>

View File

@ -18,7 +18,7 @@
47 "&#47;"}) 47 "&#47;"})
(defn- escape (defn- escape
"Escape special characters for HTML encoding." "Escape special characters for HTML and regex encoding."
[str] [str]
(def buf @"") (def buf @"")
(loop [byte :in str] (loop [byte :in str]