Skip to content

Conversation

@milahu
Copy link

@milahu milahu commented Sep 11, 2022

4 failing tests

all tests were passing in my lezer-parser-nix, currently my tests are outdated

Details
# block comment precedence
/*
# hello
*/
==>
Program (
  BlockComment  ⚠ FIXME
)
Details
# string block with escaped interpolation single line
''a''${x}b''
==>
Program (
  App (
    Select (
      IndentedString
      ⚠ FIXME
      AttrPath (
        Interpolation (
          Identifier
          "}"
        )
      )
    )
    Identifier
  )
)
Details
# string block with escaped interpolation
''
  a''${x}b
''
==>
Program (
  App (
    App (
      Select (
        IndentedString
        ⚠ FIXME
        AttrPath (
          Interpolation (
            Identifier
            "}"
          )
        )
      )
      Identifier
    )
    IndentedString (
      ⚠ FIXME
    )
  )
)
Details
# string block multiple
''
  a''${x}b
'' + ''
  a''${x}b
'' + ''
  a''${x}b
''
==>
Program (
  App (
    App (
      App (
        App (
          App (
            App (
              App (
                App (
                  Select (
                    IndentedString
                    ⚠ FIXME
                    AttrPath (
                      Interpolation (
                        Identifier
                        "}"
                      )
                    )
                  )
                  Identifier
                )
                IndentedString
              )
              Select (
                Identifier
                ⚠ FIXME
                AttrPath (
                  Interpolation (
                    Identifier
                    "}"
                  )
                )
              )
            )
            Identifier
          )
          IndentedString
        )
        Select (
          Identifier
          ⚠ FIXME
          AttrPath (
            Interpolation (
              Identifier
              "}"
            )
          )
        )
      )
      Identifier
    )
    IndentedString (
      ⚠ FIXME
    )
  )
)

for debugging, i added the tool test/manual-test.js

node test/manual-test.js $'/*\n# hello\n*/'

@lezer/lr/dist/index.js:1119
                throw new SyntaxError("No parse at " + pos);
                      ^

SyntaxError: No parse at 13
      /*
# hello
*/
                   ^

todo: fix error printing

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.

1 participant