Closed luizperes closed 6 years ago
Hmm... this is bad, but easy to fix with a good editor. Statement means a instruction, expression however means a instruction and is signed to a value to be returned, is it? I mean.... I'm trying to figure out what is the problem. If is this and you want to change the name to describe all the operations correctly, you should list what are these classes that was described wrongly and fill on this issue.
But how about using a more generic name? Like Operation
or something else. That way would be OutputExpr
-> OutputOp
. But I'm not sure about that.
We first need to list everything that should be renamed and why. The concepts of Statement
and Expression
differ from language to language and some languages have only one kind of node. In Quack, now, we have statements, expressions and also declarations. In Brain, actually, if nothing really returns and the things can be remapped to opcodes, I believe we have instructions (statements are, in general, a lot more complex), like Assembly. In Haskell, for example, we only have expressions and declarations (statements don't exist!). For Brain, the fact is: OutputExpr
is not an Expr
, but an instruction.
I agree with Instruction
as replacement for the suffixExpression
, the only problem is that I did not find a good and short way to write Instruction
as I can find forExpression
orStatement
. I mean ... OutputExp
seems clearly what is, butOutputInstr
is good? Keeping in the long form OutputInstrunction
is to me too long if this matters - but this is only aesthetics, anyway.
Instr
sounds cool to me, such as llvm do
If is a common jargon on LLVM, I'm ok with it.
We need to rename all files and classes because they are being described wrongly. For example:
OutputExpr
, should beOutputStmt
, however,ArithmeticExpr
should probably be kept the same. We need to discuss it.Any thoughts @haskellcamargo, @ryukinix, @rafaelcn ?