BBx-Kitchen / bbj-language-server

BBj Language Server
MIT License
6 stars 6 forks source link

BBj Reserved Keywords #106

Closed hyyan closed 11 months ago

hyyan commented 11 months ago

Verb names such as "open" and "close" are considered valid method names. However, the current parsing process encounters failures when a verb like "open" is used as a method name. Please refer to the list of reserved keywords in BBj, which can be found here: BBj Reserved Keywords.

CLASS public MyClass

  METHOD public MyClass open()
  METHODEND

classend
dhuebner commented 11 months ago

@hyyan I've added missing 'close' as allowed feature name. See https://github.com/BBx-Kitchen/bbj-language-server/commit/ca98e31b5ef6417e3f31b33c0a31a6e80c987a33

Please do not add all other keywords from the reserved list, but first check if it is really required. Some of them like e.g. while are also forbidden in Java and should not be added. Some are not there because the corresponding verb is probably not implemented yet.

hyyan commented 11 months ago

@dhuebner, the issue is not resolved; the previously pasted snippet still causes parsing to fail.

hyyan commented 11 months ago

@dhuebner, Additionally, the reported errors are quite misleading, not just in this specific case, but also in general

Could not resolve reference to NamedElement named 'CLASS'.bbj(linking-error) This line needs to be wrapped by line breaks.bbj

hyyan commented 11 months ago

Oops, it was a false alarm. It appears there were some cache problems with Visual Studio Code, but now it's working as expected. So, I'll go ahead and close it again.