Skip to content

The Luau astToJson code fails to read the extension input  #59

@Jediweirdo

Description

@Jediweirdo

Was trying to run this on the latest version of Lute, and got the following error:

Error parsing AST: Error: Failed to parse AST: Error: Lute execution failed: Command failed: C:\Users\[user]\.foreman\bin\lute.exe run c:\Users\[user]\.vscode\extensions\wmccrthy.luau-ast-explorer-0.1.8\lua_helpers\astToJson.luau C:\Users\[user]\AppData\Local\Temp\to_parse_1769330098043.luau
c:/Users/[user]/.vscode/extensions/wmccrthy.luau-ast-explorer-0.1.8/lua_helpers/astToJson.luau:17: attempt to call a nil value
stacktrace:
c:/Users/[user]/.vscode/extensions/wmccrthy.luau-ast-explorer-0.1.8/lua_helpers/astToJson.luau:17

In source, it points to this line:

local sourceCode = fs.readfiletostring(sourceFilePath)

So I'm guessing that the source code argument didn't pass right. If it was expecting the file path to the file, I don't know why it wanted me to highlight anything... OK after looking at the source, I see what it's doing now. Ignore that crossed out sentence

I'm not sure if this would have worked regardless, seeing that #58 hasn't been merged yet. Hopefully you're able to figure it out 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions