Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't highlight top-level-only keywords at different levels #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hi-Angel
Copy link
Contributor

@Hi-Angel Hi-Angel commented Oct 8, 2024

The keywords being modified here only represented keywords when they are at the beginning of a line with optional whitespace.

At different levels these would represent valid record fields or other identifiers.

This was tested by adding the following code to a PureScript file:

type Foo = { type :: Int
           , module :: Int
           , import :: Int
           , data :: Int
           , class :: Int
           , newtype :: Int
           , instance :: Int
           }

…and checking that compilation succeeds.

@Hi-Angel Hi-Angel force-pushed the dont-highlight-toplevel-only-keywords branch 3 times, most recently from 719d4e2 to ab85b8d Compare October 11, 2024 09:09
@Hi-Angel
Copy link
Contributor Author

upd: added instance.

The keywords being modified here only represented keywords when they
are at the beginning of a line with optional indentation.

At different levels these would represent valid record fields or other
identifiers.

This was tested by adding the following code to a PureScript file:

    type Foo = { type :: Int
               , module :: Int
               , import :: Int
               , data :: Int
               , class :: Int
               , newtype :: Int
               }

…and checking that compilation succeeds.
@Hi-Angel Hi-Angel force-pushed the dont-highlight-toplevel-only-keywords branch from ab85b8d to ba3e997 Compare October 15, 2024 14:45
@Hi-Angel
Copy link
Contributor Author

@kritzcreek , ping?

@Hi-Angel
Copy link
Contributor Author

Hi-Angel commented Nov 5, 2024

ping

1 similar comment
@Hi-Angel
Copy link
Contributor Author

ping

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.

1 participant