Skip to content

Commit

Permalink
Merge branch 'feature/atree-register-inlining' into fxamacker/integra…
Browse files Browse the repository at this point in the history
…te-with-atree
  • Loading branch information
turbolent authored Jan 24, 2024
2 parents a6df504 + fd29ad8 commit ea8fd35
Show file tree
Hide file tree
Showing 82 changed files with 9,015 additions and 783 deletions.
3,822 changes: 3,822 additions & 0 deletions npm-packages/cadence-parser/package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions npm-packages/cadence-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
{
"name": "@onflow/cadence-parser",
"version": "0.41.1",
"version": "0.42.7",
"description": "The Cadence parser",
"homepage": "https://github.com/onflow/cadence",
"repository": {
"type": "git",
"url": "https://github.com/onflow/cadence.git"
},
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"module": "./dist/esm/index.mjs",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js",
"import": "./dist/esm/index.mjs",
"types": "./dist/types/index.d.ts"
}
},
"scripts": {
"build": "npm run build:types && npm run build:esm && npm run build:cjs && GOARCH=wasm GOOS=js go build -o ./dist/cadence-parser.wasm ../../runtime/cmd/parse",
"build:types": "tsc --emitDeclarationOnly --module system --outDir dist/types",
"build:esm": "tsc --module es6 --target es6 --outDir dist/esm --declaration false",
"build:esm": "esbuild src/index.ts --bundle --sourcemap --format=esm --outfile=dist/esm/index.mjs",
"build:cjs": "tsc --module commonjs --target es6 --outDir dist/cjs --declaration false",
"test": "jest"
},
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^28.1.4",
"@types/node": "^18.0.3",
"esbuild": "0.19.4",
"jest": "^28.1.2",
"node-fetch": "^2.6.1",
"ts-jest": "^28.0.5",
Expand Down
11 changes: 11 additions & 0 deletions runtime/ast/conditionkind.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,14 @@ func (k ConditionKind) Name() string {
func (k ConditionKind) MarshalJSON() ([]byte, error) {
return json.Marshal(k.String())
}

func (k ConditionKind) Keyword() string {
switch k {
case ConditionKindPre:
return "pre"
case ConditionKindPost:
return "post"
}

panic(errors.NewUnreachableError())
}
12 changes: 8 additions & 4 deletions runtime/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ func DefaultCheckerConfig(
baseValueActivation.DeclareValue(stdlib.NewLogFunction(StandardOutputLogger{}))

return &sema.Config{
BaseValueActivation: baseValueActivation,
AccessCheckMode: sema.AccessCheckModeStrict,
BaseValueActivationHandler: func(_ common.Location) *sema.VariableActivation {
return baseValueActivation
},
AccessCheckMode: sema.AccessCheckModeStrict,
ImportHandler: func(
checker *sema.Checker,
importedLocation common.Location,
Expand Down Expand Up @@ -192,8 +194,10 @@ func PrepareInterpreter(filename string, debugger *interpreter.Debugger) (*inter
interpreter.Declare(baseActivation, stdlib.NewLogFunction(StandardOutputLogger{}))

config := &interpreter.Config{
BaseActivation: baseActivation,
Storage: storage,
BaseActivationHandler: func(_ common.Location) *interpreter.VariableActivation {
return baseActivation
},
Storage: storage,
UUIDHandler: func() (uint64, error) {
defer func() { uuid++ }()
return uuid, nil
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/computationkind.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const (
//
ComputationKindSTDLIBPanic
ComputationKindSTDLIBAssert
ComputationKindSTDLIBUnsafeRandom
ComputationKindSTDLIBRevertibleRandom
_
_
_
Expand Down
6 changes: 3 additions & 3 deletions runtime/common/computationkind_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ea8fd35

Please sign in to comment.