improved identifier classification function

This commit is contained in:
2025-09-22 00:39:00 +09:00
parent 5819be7fa5
commit a0fd6c5048
4 changed files with 129 additions and 90 deletions

View File

@ -1,12 +1,12 @@
$?a ##ERROR: syntax error - '?' prohibited as first character after '$'
$?a ##ERROR: syntax error - invalid dollar-prefixed identifier '$?a'
---
$include ##ERROR: syntax error - $include target not specified
$include ##ERROR: syntax error - '$include' target not specified
---
$include 10 ##ERROR: syntax error - $include target expected in place of '10'
$include 10 ##ERROR: syntax error - '$include' target expected in place of '10'
---
@ -146,11 +146,11 @@ abc- := 20 ##ERROR: syntax error - '-' prohibited as last character of identifie
---
self.g- := 20 ##ERROR: syntax error - '-' prohibited as last character of identifier or identifier segment
self.g- := 20 ##ERROR: syntax error - wrong multi-segment identifier - self.g-
---
self.-g := 20 ##ERROR: syntax error - '-' prohibited as first character of identifier or identifier segment
self.-g := 20 ##ERROR: syntax error - wrong multi-segment identifier - self.-g
---
@ -162,7 +162,7 @@ abc. := 20 ##ERROR: syntax error - blank segment after 'abc.'
---
abc.? := 20 ##ERROR: syntax error - '?' prohibited as first character of identifier or identifier segment after 'abc.'
abc.? := 20 ##ERROR: syntax error - wrong multi-segment identifier - abc.?
---