diff --git a/Makefile b/Makefile index b2af1fb..d5f00d3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SEMANTICS_FILES ::= $(shell find rust-semantics/ -type f -name '*') +SEMANTICS_FILES ::= $(shell find rust-semantics/ -type f -a '(' -name '*.md' -or -name '*.k' ')') RUST_KOMPILED ::= .build/rust-kompiled RUST_TIMESTAMP ::= $(RUST_KOMPILED)/timestamp SYNTAX_INPUT_DIR ::= tests/syntax diff --git a/rust-semantics/preprocessing/helpers.md b/rust-semantics/preprocessing/helpers.md index 96fc6f1..2da8f06 100644 --- a/rust-semantics/preprocessing/helpers.md +++ b/rust-semantics/preprocessing/helpers.md @@ -67,7 +67,9 @@ module RUST-PREPROCESSING-PRIVATE-HELPERS syntax NormalizedFunctionParameterOrError ::= normalizeParam(FunctionParam) [function, total] rule normalizeParam(_:OuterAttributes Name:Identifier : T:Type) => Name : T - rule normalizeParam(P:FunctionParam) => error("unimplemented normalizedParam case", P:FunctionParam:KItem) + rule normalizeParam(P:FunctionParam) + => error("unimplemented normalizedParam case", P:FunctionParam:KItem) + [owise] syntax BlockExpressionOrSemicolon ::= getFunctionBlockOrSemicolon(Function) [function, total] rule getFunctionBlockOrSemicolon(_Q:FunctionQualifiers F:FunctionWithoutQualifiers) diff --git a/tests/execution/function-arguments.rs b/tests/execution/function-arguments.rs new file mode 100644 index 0000000..46d79b6 --- /dev/null +++ b/tests/execution/function-arguments.rs @@ -0,0 +1,24 @@ +#![no_std] + +#[allow(unused_imports)] +use multiversx_sc::imports::*; + +#[multiversx_sc::contract] +pub trait Empty { + #[init] + fn init(&self) { + } + + #[upgrade] + fn upgrade(&self) {} + + fn self_with_comma(&self, ) {} + + fn self_and_arg(&self, first: BigUint) {} + + fn self_and_args(&self, first: BigUint, second: BigUint) {} + + fn self_and_args_comma(&self, first: BigUint, second: BigUint, ) {} + + fn reference_arg(&self, first: &BigUint) {} +}