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

Errors with expressions #9

Open
rockerBOO opened this issue Aug 3, 2022 · 0 comments
Open

Errors with expressions #9

rockerBOO opened this issue Aug 3, 2022 · 0 comments

Comments

@rockerBOO
Copy link

rockerBOO commented Aug 3, 2022

I've been working on a html parser to work well with .html.eex files and found these errors when using this grammar.

2022-08-03_18-49

I looked at it some but I didn't make much progress as I do not understand some parts of the grammar.

So here's my test case and the resulting errors when testing.

<%= Enum.map(errors, fn error -> error end) |> Enum.join("") %>
<%= Enum.each(errors, fn error -> if error do %>error<%= end) %>
<%= Enum.each(errors, fn error -> if Map.has_key?(error,
  :email) do %><%= error.email %><%= end) %>
<%= Enum.map(errors, fn error -> if Map.has_key?(error,
  :email) do "hello" end) |> Enum.join("") %>
    (fragment
      (directive
        (partial_expression)
        (ERROR
          (UNEXPECTED 'r')
          (UNEXPECTED '|')))
      (directive
        (partial_expression)
        (ERROR
          (UNEXPECTED 'i')))
      (text)
      (directive
        (partial_expression))
      (directive
        (partial_expression)
        (ERROR
          (UNEXPECTED 'i')))
      (directive
        (expression))
      (directive
        (partial_expression))
      (directive
        (ERROR
          (partial_expression)
          (UNEXPECTED 'i')
          (UNEXPECTED '"'))
        (partial_expression))
      (text))

Willing to try and fix this. But I'm lacking on context for how it's expected to work or why it may be erroring.

@rockerBOO rockerBOO changed the title Errors when using anonymous functions Errors with expressions Aug 3, 2022
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

1 participant