Skip to content

Commit

Permalink
Merge pull request #164 from Andre0n/master
Browse files Browse the repository at this point in the history
 Corrigindo bug na declaração de funções no escopo global. #163
  • Loading branch information
lucaspompeun authored Jan 8, 2023
2 parents 7b3bb09 + a921c7d commit 71fd54e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/egua.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports.Egua = class Egua {
}

runPrompt() {
const interpreter = new Interpreter(this, process.cwd(), undefined);
const interpreter = new Interpreter(this, process.cwd());
console.log("Console da Linguagem Égua");
const rl = readline.createInterface({
input: process.stdin,
Expand Down
5 changes: 1 addition & 4 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,10 +798,7 @@ module.exports = class Parser {

declaration() {
try {
if (
this.check(tokenTypes.FUNÇÃO) &&
this.checkNext(tokenTypes.IDENTIFIER)
) {
if (this.check(tokenTypes.FUNÇÃO)) {
this.consume(tokenTypes.FUNÇÃO, null);
return this.function("função");
}
Expand Down

0 comments on commit 71fd54e

Please # to comment.