1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-16 13:44:48 +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>
<string>#readermac</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#longstring</string>
</dict>
<dict>
<key>include</key>
<string>#literal</string>
@ -83,14 +91,6 @@
<key>include</key>
<string>#symbol</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#longstring</string>
</dict>
</array>
</dict>
<key>comment</key>
@ -261,7 +261,7 @@
<string>(@?")</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.janet</string>
@ -271,7 +271,7 @@
<string>(")</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.janet</string>
@ -292,20 +292,25 @@
<key>longstring</key>
<dict>
<key>begin</key>
<string>@?(`+)</string>
<string>(@?)(`+)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.janet</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.janet</string>
</dict>
</dict>
<key>end</key>
<string>\1</string>
<string>\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.janet</string>

View File

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