Skip to content
Draft
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
1 change: 1 addition & 0 deletions doc/md/examples/grammar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
<parenthetical>? <obj_or_class_dec>
'mixin' <pat_plain> <obj_body>
'include' <id> <exp>
'func' <text>

<obj_or_class_dec> ::=
<obj_sort> <id>? (':' <typ>)? '='? <obj_body>
Expand Down
2 changes: 2 additions & 0 deletions src/mo_frontend/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,8 @@ dec_nonvar :
MixinD(p, dfs) @? at $sloc
}
| INCLUDE x=id e=exp(ob) { IncludeD(x, e, ref None) @? at $sloc }
| FUNC s=TEXT
{ ExpD (PrimE(s) @? at $sloc) @? at $sloc }

obj_or_class_dec :
| ds=obj_sort xf=id_opt t=annot_opt EQ? efs=obj_body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cd $ROOT_DIR || exit
# Create target directory if it doesn't exist
mkdir -p target
echo --- Compiling Motoko that imports components with -wasm-components flag...&&
MOC_UNLOCK_PRIM=true moc $MO_SRC_DIR/Main.mo -wasi-system-api -wasm-components --legacy-persistence $MOC_PACKAGES $MOC_COMPONENT_PACKAGES -o target/motoko.wasm &&
moc $MO_SRC_DIR/Main.mo -wasi-system-api -wasm-components --legacy-persistence $MOC_PACKAGES $MOC_COMPONENT_PACKAGES -o target/motoko.wasm &&
echo --- Generated WIT-file target/motoko.wit &&
cat target/motoko.wit &&
echo --- Generated WAC-file target/motoko.wac &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import Result "mo:core/Result";

module ic_sig_verifier {
public func verifyBlsSig(signature : Blob, message : Blob, public_key : Blob) : Result.Result<(), Text> =
((prim "component:ic-sig-verifier:verify-bls-sig") : (Blob, Blob, Blob) -> Result.Result<(), Text>) (signature, message, public_key);
((func "component:ic-sig-verifier:verify-bls-sig") : (Blob, Blob, Blob) -> Result.Result<(), Text>) (signature, message, public_key);
public func verifyCanisterSig(signature_cbor : Blob, message: Blob, public_key_der : Blob, ic_root_public_key_raw : Blob) : Result.Result<(), Text> =
((prim "component:ic-sig-verifier:verify-canister-sig") : (Blob, Blob, Blob, Blob) -> Result.Result<(), Text>)(signature_cbor, message, public_key_der, ic_root_public_key_raw);
((func "component:ic-sig-verifier:verify-canister-sig") : (Blob, Blob, Blob, Blob) -> Result.Result<(), Text>)(signature_cbor, message, public_key_der, ic_root_public_key_raw);
public func verifyCanisterSigMainnet(args_serialized : Blob) : Result.Result<(), Text> =
((prim "component:ic-sig-verifier:verify-canister-sig-mainnet") : Blob -> Result.Result<(), Text>) args_serialized;
((func "component:ic-sig-verifier:verify-canister-sig-mainnet") : Blob -> Result.Result<(), Text>) args_serialized;
};
Loading