Reputation: 33
I am currently looking through the first page of documentation for LUA and noticed that every assignment appears as var ::= Name
, however I could not find any reference to the syntax of ::=
itself. The documentation goes over the structuring of an assignment but glosses over these symbols. What I want to know is if every assignment requires the ::
before the actual assignment operator, and, if so, why is it structured this way and not just a plain =
?
Upvotes: 0
Views: 642
Reputation: 475
It's the assignment operator - typically used in formal grammars.
Upvotes: -1
Reputation: 473272
What you're seeing is not Lua code, but a fragment of the grammar of the Lua language, as defined in Backus-Naur Form. The ::=
operator is part of BNF.
Upvotes: 4