Skip to content

Commit efa7e05

Browse files
committed
More fixes parsing & to highlighting symbols + test samples added to example_file.fy
1 parent ec15848 commit efa7e05

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

example_file.fy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,11 @@ pm match_with_extract: "Hello : World!"
110110
[3, 2, 1] reverse() each() |a| { puts(a) }
111111
"Hello" sub("ll", "y") println
112112
[3, 2, 1] map() |a| { a * 2 } inject(0) |s i| { s + i } println
113+
114+
# test symbol highlighting
115+
['foo]
116+
['foo?!]
117+
{'foo}
118+
{'foo!?}
119+
{'foo:bar?!=&/:}
120+
('foo)

fancy_pygments/fancy_lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class FancyLexer(RegexLexer):
4949
# Comments
5050
(r'#(.*?)\n', Comment.Single),
5151
# Symbols
52-
(r'\'([^\'\s\[\]]+|\[\])', String.Symbol),
52+
(r'\'([^\'\s\[\]\(\)\{\}]+|\[\])', String.Symbol),
5353
# Multi-line DoubleQuotedString
5454
(r'"""(\\\\|\\"|[^"])*"""', String),
5555
# DoubleQuotedString

0 commit comments

Comments
 (0)