Skip to content

Commit

Permalink
Limpando um pouco o código
Browse files Browse the repository at this point in the history
  • Loading branch information
sqmedeiros committed Jul 8, 2016
1 parent 33ff5d2 commit 0f647ec
Showing 1 changed file with 6 additions and 31 deletions.
37 changes: 6 additions & 31 deletions parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,41 +57,16 @@ for k, v in ipairs(terror) do
labelCode[v.l] = k
end


local predef = { ["countLine"] = countLine,
["incLinha"] = incLinha,
["noExp"] = arvore.noExp,
["noNaoExp"] = arvore.noNaoExp,
["noMenosUnario"] = arvore.noMenosUnario,
["noId"] = arvore.noId,
["noInteiro"] = arvore.noInteiro,
["noReal"] = arvore.noReal,
["noTexto"] = arvore.noTexto,
["noBoolFalso"] = arvore.noBoolFalso,
["noBoolVerd"] = arvore.noBoolVerd,
["noOpNumExp"] = arvore.noOpNumExp,
["noOpCompExp"] = arvore.noOpCompExp,
["noOpBoolExp"] = arvore.noOpBoolExp,
["noCmdAtrib"] = arvore.noCmdAtrib,
["noCmdRepita"] = arvore.noCmdRepita,
["noCmdSe"] = arvore.noCmdSe,
["noCmdSenaoSe"] = arvore.noCmdSenaoSe,
["noChamadaFunc"] = arvore.noChamadaFunc,
["noCmdChamada"] = arvore.noCmdChamada,
["noCmdRetorne"] = arvore.noCmdRetorne,
["noKwRetorne"] = arvore.noKwRetorne,
["noDecVarL"] = arvore.noDecVarL,
["noListaParam"] = arvore.noListaParam,
["noDecVar"] = arvore.noDecVar,
["noDecFuncao"] = arvore.noDecFuncao,
["noDecArrayVar"] = arvore.noDecArrayVar,
["noBloco"] = arvore.noBloco,
["noNovoArrayExp"] = arvore.noNovoArrayExp,
["noTipo"] = arvore.noTipo,
["noVar"] = arvore.noVar
["getToken"] = defs.getToken,
["getTipoBasico"] = defs.getTipoBasico
}

predef["getToken"] = defs.getToken
predef["getTipoBasico"] = defs.getTipoBasico
for k, v in pairs(arvore) do
predef[k] = v
end

re.setlabels(labelCode)

Expand Down

0 comments on commit 0f647ec

Please sign in to comment.