Squirrel

The programming language
Welcome to Squirrel Sign in | Join | Help
in Search

about sq -c option - syntax check

Last post 05-16-2008, 4:49 AM by fagiano. 3 replies.
Sort Posts: Previous Next
  •  05-14-2008, 5:21 AM 2508

    about sq -c option - syntax check

    When I make a mistype or something wrong in sq script file,

    the sq utility can not check the syntax error.

    for example,

    class Temp
    {
        function TMP()
        {
            kldfjkldsjflksdjfklsjdf
        }
    }

    this code have no problem with sq -c

    so how can I check the syntax ?

    there is no way?

    thank you for your answer :)

     

  •  05-14-2008, 3:13 PM 2509 in reply to 2508

    Re: about sq -c option - syntax check

    the problem here is that in your code there isn't any suntax error :)

    squirrel's compiler cannot know that "kldfjkldsjflksdjfklsjdf" is not a valid variable at compile time.

    ciao

    Alberto

  •  05-15-2008, 4:58 AM 2511 in reply to 2509

    Re: about sq -c option - syntax check

    so, I need to make a compiler ?

    is there a way to teach for sq knows vaild variable or not?

     

  •  05-16-2008, 4:49 AM 2514 in reply to 2511

    Re: about sq -c option - syntax check

    you will not find any dynamic language that can catch this kind of error at compile time. you need to use a statically typed language fot this kind of things.

    Alberto

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems