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
 	T_IDENTIFIER("[a-zA-Z_][a-zA-Z_0-9]*"),
17
 	T_IDENTIFIER("[a-zA-Z_][a-zA-Z_0-9]*"),
18
 	T_FLOAT("\\-?(0|[1-9][0-9]*)\\.[0-9]+([eE][\\+\\-]?[0-9]+)?"),
18
 	T_FLOAT("\\-?(0|[1-9][0-9]*)\\.[0-9]+([eE][\\+\\-]?[0-9]+)?"),
19
 	T_INT("\\-?(0|[1-9][0-9]*)"),
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
 	T_AOPEN("\\{"),
22
 	T_AOPEN("\\{"),
23
 	T_ACLOSE("\\}"),
23
 	T_ACLOSE("\\}"),
24
 	T_SQOPEN("\\["),
24
 	T_SQOPEN("\\["),

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

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

Loading…
Cancel
Save