Open danielbecroft opened 3 months ago
I've noticed that system handles (file-information, session, error-status etc are not being parsed correctly). They are all coming through as variable.language.abl:
@danielbecroft What is your expectation here?
These are deliberately scoped to variable.language.abl
, per the rules in https://macromates.com/manual/en/language_grammars#language_rules (which are used as a guideline for how to scope the many ABL statements and keywords ).
That page says
variable — variables. Not all languages allow easy identification (and thus markup) of these. ... language — reserved language variables like this, super, self, etc.****
@PeterJudgeZA Good question. I guess I'm used to something like PDSOE that would highlight anything that's a keyword as a keyword. Contrast this to the parsing here, and it looks odd. It also look strange when this-object
(on its own) is a keyword.other.abl
, but as soon as it's got a colon after it, it becomes variable.language.abl
:
// scope(this-procedure): keyword.other.abl source.abl (fore: keyword.other)
vHandle = this-procedure.
// scope(this-procedure): variable.language.abl source.abl (fore: variable.language)
vHandle = this-procedure:first-sibling.
this-procedure
hasn't changed from what it is, so I wouldn't be expecting a change to how it's highlighted.
It might just be what it is, and I'll have to get used to how it looks.
Contrast this to the parsing here, and it looks odd. It also look strange when this-object (on its own) is a keyword.other.abl, but as soon as it's got a colon after it, it becomes variable.language.abl:
Yes, good point. this-object
and this-procedure
(and the other system handles) should both always be scoped as variable.language.abl
, regardless of any trailing colons.
-- peter
From: Daniel Becroft @.> Sent: Monday, September 9, 2024 12:05:41 AM To: vscode-abl/vscode-abl @.> Cc: Peter Judge @.>; Mention @.> Subject: Re: [vscode-abl/vscode-abl] Syntax highlighting - system handles (Issue #183)
@PeterJudgeZAhttps://github.com/PeterJudgeZA Good question. I guess I'm used to something like PDSOE that would highlight anything that's a keyword as a keyword. Contrast this to the parsing here, and it looks odd. It also look strange when this-object (on its own) is a keyword.other.abl, but as soon as it's got a colon after it, it becomes variable.language.abl:
// scope(this-procedure): keyword.other.abl source.abl (fore: keyword.other) vHandle = this-procedure.
// scope(this-procedure): variable.language.abl source.abl (fore: variable.language) vHandle = this-procedure:first-sibling.
this-procedure hasn't changed from what it is, so I wouldn't be expecting a change to how it's highlighted.
It might just be what it is, and I'll have to get used to how it looks.
— Reply to this email directly, view it on GitHubhttps://github.com/vscode-abl/vscode-abl/issues/183#issuecomment-2336854720, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB7IJ2OQASC57KRASDVKT4LZVTJ4LAVCNFSM6AAAAABNTSXYMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWHA2TINZSGA. You are receiving this because you were mentioned.
LanguageServerInfo: 1.16.0-SNAPSHOT-607d691 -- ClientInfo: Visual Studio Code 1.92.2 -- JVM: Oracle Corporation 17.0.6+9-LTS-190
I've noticed that system handles (
file-information
,session
,error-status
etc are not being parsed correctly). They are all coming through asvariable.language.abl
:I've tried to have a poke around the abl-tmllanguage repository, and the tests are expecting that this is the case. For example, in
specs/misc-statements/return-statement.spec.js
(below), thesession
token is expected to bevariable.language.abl
I can see scenarios like
SessionManager
(spec/type-name/type-name.spec.js
), where it would be parsed as a variable, since this is a class/package name, not a system handle:I don't know if it's an "simple" as changing
abl.tmLanguage.json
to this, but that breaks alot of tests (as noted above).