Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusarich committed Jun 11, 2024
1 parent 9030d65 commit 7012e13
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
30 changes: 19 additions & 11 deletions src/grammar/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,15 @@ semantics.addOperation<ASTNode>("astOfDeclaration", {
semantics.addOperation<ASTNode>("astOfStatement", {
// TODO: process StatementBlock

StatementLet(_letKwd, id, _colon, type, _equals, expression, _semicolon) {
StatementLet_withType(
_letKwd,
id,
_colon,
type,
_equals,
expression,
_semicolon,
) {
checkVariableName(id.sourceString, createRef(id));

return createNode({
Expand All @@ -582,6 +590,16 @@ semantics.addOperation<ASTNode>("astOfStatement", {
ref: createRef(this),
});
},
StatementLet_withoutType(_arg0, arg1, _arg2, arg3, _arg4) {
checkVariableName(arg1.sourceString, createRef(arg1));

return createNode({
kind: "statement_let_no_type",
name: arg1.sourceString,
expression: arg3.resolve_expression(),
ref: createRef(this),
});
},
StatementReturn(_returnKwd, optExpression, _semicolon) {
return createNode({
kind: "statement_return",
Expand Down Expand Up @@ -830,16 +848,6 @@ semantics.addOperation<ASTNode>("astOfType", {
ref: createRef(this),
});
},
StatementLet_withoutType(arg0, arg1, arg2, arg3, arg4) {
checkVariableName(arg1.sourceString, createRef(arg1));

return createNode({
kind: "statement_let_no_type",
name: arg1.sourceString,
expression: arg3.resolve_expression(),
ref: createRef(this),
});
},
Type_regular(typeId) {
return createNode({
kind: "type_ref_simple",
Expand Down
1 change: 0 additions & 1 deletion src/test/feature-local-type-inference.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe('feature-local-type-inference', () => {
const system = await ContractSystem.create();
const treasure = system.treasure('treasure');
const contract = system.open(await LocalTypeInferenceTester.fromInit());
const tracker = system.track(contract.address);
await contract.send(treasure, { value: toNano('10') }, { $$type: 'Deploy', queryId: 0n });
await system.run();

Expand Down

0 comments on commit 7012e13

Please sign in to comment.