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

How does tokenize separate SourceLines? #182

Open
Eisverygoodletter opened this issue Dec 12, 2023 · 1 comment
Open

How does tokenize separate SourceLines? #182

Eisverygoodletter opened this issue Dec 12, 2023 · 1 comment

Comments

@Eisverygoodletter
Copy link

The function tokenize outputs an array of SourceLines. Is it guaranteed that if i provide it with Text with some multiline code, every line's tokens will be mapped to one SourceLine without any formatting/line changing behaviour?

For example, if I had this single line of oddly written piece of C code:

int do_something() { call_a_function(); int some_number = 3; return 123; }

Would very token (e.g. int, do_something, (), {, call_a_function ...) will end up on the same SourceLine with every token in sequence?

@jgm
Copy link
Owner

jgm commented Dec 12, 2023

Yes -- why don't you simply try it?

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

No branches or pull requests

2 participants