Skip to content

Conversation

@jiribenes
Copy link
Contributor

@jiribenes jiribenes commented Jul 20, 2024

Warning

This has NOT been tested!

In sync with effekt-lang/effekt-vscode#18, let's try to update the syntax files a little bit.
Here I attempted to keep things mostly as they are, remove extremely outdated parts and port (at least some of) the changes from effekt-lang/effekt-vscode#18.

Also, sorry for the wrong push in 8927cc8. 🙏

@jiribenes jiribenes force-pushed the jiribenes/syntax-update branch from 1fea08d to a6eae04 Compare July 20, 2024 08:08
Comment on lines -69 to -72
var CLASS = {
className: 'class',
beginKeywords: 'class object trait type',
end: /[:={\[\n;]/,
Copy link
Contributor Author

@jiribenes jiribenes Jul 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we really used this anywhere except for type declarations so I merged the important parts with METHOD to make DEFINITION.

@jiribenes jiribenes requested a review from dvdvgt September 10, 2024 11:26
@jiribenes
Copy link
Contributor Author

Hey @dvdvgt, if you get some time, could you just try if this highlighting looks okay to you on your local website build?

Copy link
Collaborator

@dvdvgt dvdvgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work just as before, but also does not fix some of the issue of the previous highlighter (see comments).

Comment on lines 89 to 90
[/\/\*/, 'comment', '@push'],
["\\*/", 'comment', '@pop'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this does not work (as before):

/*
 * Used as a type for `Exception` in functions which expect a non-empty
 * container (e.g. option or list).
 */
record MissingValue()

Here, the lines following beyond the */ are also greyed out

],

bracketCounting: [
[/\{/, 'delimiter.bracket', '@bracketCounting'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does seem to get confused on this example:

extern io def panic[R](msg: String): R =
  js "${ msg ++ "{42}"}"

Here, the 42 is coloured like a literal (blue) while it should coloured like a string (green)

@jiribenes jiribenes requested a review from dvdvgt September 12, 2024 12:02
@jiribenes
Copy link
Contributor Author

I tried fixing the two outlined things, PTAL. 🙏

Copy link
Collaborator

@dvdvgt dvdvgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, still looks incomplete to me:

  • image
  • image

But I sadly don't know what the issue is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants