Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Corrigindo bug na declaração de funções no escopo global. #163

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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