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

Add support for the lean comment format to the tokenizer #6625

Merged
merged 5 commits into from
Dec 11, 2023

Conversation

lildude
Copy link
Member

@lildude lildude commented Dec 6, 2023

Description

Adds support for the lean /- ... -/ comment format to the tokenizer.

I discovered this was the cause of the problems with the classifier in #6616.

The only changes really looking at are those in ext/linguist/tokenizer.l and test/test_tokenizer.rb and the others are updated by flex base on the content of test/test_tokenizer.rb.

I know absolutely nothing about Lean, am barely competent in lex and slightly fluent in regex so there's probably scope for improvement here 😁 @eric-wieser @Alhadis can you please check my homework 🙇

Checklist:

  • I am adding new or changing current functionality
    • I have added or updated the tests for the new or changed functionality.

@lildude lildude requested a review from a team as a code owner December 6, 2023 11:46
test/test_tokenizer.rb Outdated Show resolved Hide resolved
test/test_tokenizer.rb Outdated Show resolved Hide resolved
test/test_tokenizer.rb Outdated Show resolved Hide resolved
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@lildude lildude merged commit 71a100d into master Dec 11, 2023
8 checks passed
@lildude lildude deleted the lildude/tokeniser-lean-comments branch December 11, 2023 11:58
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants