Very important change
This commit is contained in:
parent
58b5e61740
commit
ee8b7a8f45
|
|
@ -2844,8 +2844,8 @@ static TestResult test_Identifier_Starting_With_Number() {
|
||||||
return pass_test(&test, result);
|
return pass_test(&test, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
static TestResult test_Identifier_With_Hash() {
|
static TestResult test_Identifier_With_Octothorpe() {
|
||||||
LexerTest test = start_up_test(SLS_STR("Identifier With Hash"), SLS_STR("my#var"));
|
LexerTest test = start_up_test(SLS_STR("Identifier With Octothorpe"), SLS_STR("my#var"));
|
||||||
LexerResult result = lexical_analysis(&test.lexer_info);
|
LexerResult result = lexical_analysis(&test.lexer_info);
|
||||||
if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error);
|
if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error);
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
|
|
@ -3828,7 +3828,7 @@ TestsReport run_lexer_tests() {
|
||||||
test_report.tests[i++] = test_Identifier_Very_Long();
|
test_report.tests[i++] = test_Identifier_Very_Long();
|
||||||
test_report.tests[i++] = test_Identifier_Long_With_Numbers();
|
test_report.tests[i++] = test_Identifier_Long_With_Numbers();
|
||||||
test_report.tests[i++] = test_Identifier_Starting_With_Number();
|
test_report.tests[i++] = test_Identifier_Starting_With_Number();
|
||||||
test_report.tests[i++] = test_Identifier_With_Hash();
|
test_report.tests[i++] = test_Identifier_With_Octothorpe();
|
||||||
test_report.tests[i++] = test_Identifier_With_Dot();
|
test_report.tests[i++] = test_Identifier_With_Dot();
|
||||||
test_report.tests[i++] = test_Identifier_With_Space();
|
test_report.tests[i++] = test_Identifier_With_Space();
|
||||||
test_report.tests[i++] = test_Identifier_With_Colon();
|
test_report.tests[i++] = test_Identifier_With_Colon();
|
||||||
|
|
|
||||||
|
|
@ -3202,7 +3202,7 @@
|
||||||
tokens:
|
tokens:
|
||||||
- type: error
|
- type: error
|
||||||
value: 'Invalid decimal literal: unexpected ''a'' in decimal integer.'
|
value: 'Invalid decimal literal: unexpected ''a'' in decimal integer.'
|
||||||
- name: Identifier With Hash
|
- name: Identifier With Octothorpe
|
||||||
code: my#var
|
code: my#var
|
||||||
tokens:
|
tokens:
|
||||||
- type: error
|
- type: error
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ class IdentifierTestGenerator(BaseTestGenerator):
|
||||||
"Invalid decimal literal: unexpected 'a' in decimal integer.")
|
"Invalid decimal literal: unexpected 'a' in decimal integer.")
|
||||||
|
|
||||||
# Invalid characters
|
# Invalid characters
|
||||||
self.make_error_test("Identifier With Hash",
|
self.make_error_test("Identifier With Octothorpe",
|
||||||
"my#var",
|
"my#var",
|
||||||
"Invalid identifier: '#' is not allowed in identifiers.")
|
"Invalid identifier: '#' is not allowed in identifiers.")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue