Giter VIP home page Giter VIP logo

Comments (2)

danii avatar danii commented on June 12, 2024

This bug is not reproducible for me. There is a chance that the error message is referencing a different comma inside of your file, if there is more than what you provided in your file. I wouldn't know where, but if I had to guess, it's in a for x, y in z do loop (which is a known issue, although there isn't an open issue for it).

from hematita.

 avatar commented on June 12, 2024

You are right.

I found the "issue". On luajit the code is ran normally, but your way of doing lexer first, in hematita helps on detect undefined variables. That's a good thing, but for custom functions maybe could be an issue, which is my case. By the way, logon_exists is a lua table (A custom one).
You can reproduce the "error" with this code:

function logon()
    local html_header = [[
<html>
    <head>
        <style>
        table, th, td {
          border: 1px solid black;
          border-collapse: collapse;
        }
        </style>
    </head>
    <body>
    ]]
    local html_footer = [[
    </body>
</html>
]]

    print(html_header)

    if logon_exists
    then
        local table_header = [[
            <h2>Logon - (logon_exists)</h2>
            <table>
                <thead>
                    <tr><th>Key</th><th>Value</th></tr>
                </thead><tbody>
        ]]
        print(table_header)
    
        for k,v in pairs(logon_exists) do
            print("<tr>")
            local key_column = "<td>" .. k .. "</td>"
            local value_column = "<td>" .. v .. "</td>"
            print(key_column)
            print(value_column)
            print("</tr>")
        end
        print ("</tbody></table>")
    end
    local html_footer = [[
    </body>
</html>
    ]]
    print(html_footer)
end
    

function main()
    logon()
end


main()

from hematita.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.