Browse Source

Fixed support for named character entities.

Stan Hebben 6 years ago
parent
commit
20cecb824f

+ 2
- 2
Parser/src/main/java/org/openzen/zenscript/lexer/ZSTokenType.java View File

@@ -17,8 +17,8 @@ public enum ZSTokenType implements TokenType {
17 17
 	T_IDENTIFIER("[a-zA-Z_][a-zA-Z_0-9]*"),
18 18
 	T_FLOAT("\\-?(0|[1-9][0-9]*)\\.[0-9]+([eE][\\+\\-]?[0-9]+)?"),
19 19
 	T_INT("\\-?(0|[1-9][0-9]*)"),
20
-	T_STRING_SQ("\"([^\"\\\\]|\\\\([\'\"\\\\/bfnrt]|u[0-9a-fA-F]{4}))*\""),
21
-	T_STRING_DQ("\'([^\'\\\\]|\\\\([\'\"\\\\/bfnrt]|u[0-9a-fA-F]{4}))*\'"),
20
+	T_STRING_SQ("\"([^\"\\\\]|\\\\([\'\"\\\\/bfnrt&]|u[0-9a-fA-F]{4}))*\""),
21
+	T_STRING_DQ("\'([^\'\\\\]|\\\\([\'\"\\\\/bfnrt&]|u[0-9a-fA-F]{4}))*\'"),
22 22
 	T_AOPEN("\\{"),
23 23
 	T_ACLOSE("\\}"),
24 24
 	T_SQOPEN("\\["),

+ 1
- 1
ScriptingExample/scripts/helloworld.zs View File

@@ -1,3 +1,3 @@
1
-println("Hello world!");
1
+println("Hello \© world!");
2 2
 println(5);
3 3
 println(1 + 3);

Loading…
Cancel
Save