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 pre-parse module #169

Open
rodrigosiqueira opened this issue Jan 22, 2017 · 2 comments
Open

Add pre-parse module #169

rodrigosiqueira opened this issue Jan 22, 2017 · 2 comments

Comments

@rodrigosiqueira
Copy link
Member

Add pre-parse to Kuniri to handle basic stuffs before it starts to parse all the code. The first thing to handle is multiple lines with "+".
For example:

stringLa = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio." +
  "Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum" +
"imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper"

It is important to build a specific structure for pre-parse, because we will find many other cases in the future to add to this part.

@rodrigosiqueira
Copy link
Member Author

This issue will solve #173

@rodrigosiqueira
Copy link
Member Author

New stuffs for pre-parser:

  1. Convert 'do ... end' to '{...}' in all cases
  2. Join break lines with '+'
  3. Remove comments and save it in a hash
  4. Handle blocks divided in different lines to a common syntax. E.g.:
lambda do |x, y|
...
end

lambda do
|k,l|
end

lambda do |
x, y|
end

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

No branches or pull requests

1 participant