How should i name expressions that dont have a brace?
I am adding more to my language using bison and in the开发者_如何学编程 rules i am getting a little confused.
How do i name expressions that have {} such as class, functions, switch etc VS expressions that need a semicolon at the end of them (Int i;)
I had them as typeExprWO VS typeExpr but i mixed them up having WO meaning without the need a semicolon (aka has a brace) in some areas and without brace (so it needs semicolons) in other places.
I need a better name. Ideas?
Normally, that would be a declaration
or a statement
.
Statements are normally expressions with no meaningful return value or a discarded return value.
A sequence of statements is normally called a block
(or block statement
), but in the case of declaration (inc method declaration), the name body
might be a better choice.
精彩评论