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

OCaml parser and first functions added #21

Merged
merged 1 commit into from
Jul 30, 2022

Conversation

mattiasdrp
Copy link
Contributor

This update allows to fold comments, value, type and module definitions if they're not on one line only

I'm not sure about the one line rule but it seems strange to fold a value that fits on one line

resolves #18

Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

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

There are couple of warnings, let's try to avoid it as possible.

In toplevel form:
ts-fold.el:457:1:Warning: variable ‘_’ not left unused
ts-fold.el:457:1:Warning: Unused lexical argument ‘offset’
ts-fold.el:473:1:Warning: variable ‘_’ not left unused
ts-fold.el:473:1:Warning: Unused lexical argument ‘offset’
ts-fold.el:489:1:Warning: variable ‘_’ not left unused
ts-fold.el:489:1:Warning: Unused lexical argument ‘offset’
ts-fold.el:515:1:Warning: variable ‘_’ not left unused
ts-fold.el:515:1:Warning: Unused lexical argument ‘offset’

ts-fold.el Outdated Show resolved Hide resolved
ts-fold.el Outdated Show resolved Hide resolved
ts-fold-parsers.el Outdated Show resolved Hide resolved
@mattiasdrp mattiasdrp force-pushed the ocaml-parser branch 4 times, most recently from 3bb9f9c to fcdc407 Compare July 29, 2022 16:25
@mattiasdrp
Copy link
Contributor Author

I got rid of the warnings by enclosing the when-let in an unless

ts-fold.el Outdated Show resolved Hide resolved
@jcs090218
Copy link
Member

Can you update our README file as well? Add OCaml to supported languages list! Thanks!

@jcs090218
Copy link
Member

jcs090218 commented Jul 29, 2022

I think you name the function to tsc-fold--..., but it should be ts-fold.... Without the c.

ts-fold.el Outdated Show resolved Hide resolved
Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

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

Some warnings we should address:

ts-fold.el:474:1:Warning: Unused lexical argument ‘offset’
ts-fold.el:488:1:Warning: Unused lexical argument ‘offset’
ts-fold.el:502:1:Warning: Unused lexical argument ‘offset’
ts-fold.el:522:1:Warning: Unused lexical argument ‘offset’

Others LGTM! Thanks for the hard work! ❤️ Let me know if this is ready to merge! Thanks!

ts-fold.el Outdated Show resolved Hide resolved
ts-fold.el Outdated Show resolved Hide resolved
ts-fold.el Outdated Show resolved Hide resolved
ts-fold.el Outdated Show resolved Hide resolved
This update allows to fold comments, value, type and module
definitions if they're not on one line only

I'm not sure about the one line rule but it seems strange to fold a
value that fits on one line
@jcs090218
Copy link
Member

Should be good now! Thanks! :)

@jcs090218 jcs090218 merged commit a7c2994 into emacs-tree-sitter:master Jul 30, 2022
@mattiasdrp mattiasdrp deleted the ocaml-parser branch July 30, 2022 07:23
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.

Add an OCaml parser
2 participants