-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from WebAssembly/kernel
Introduce explicit type for full AST
- Loading branch information
Showing
21 changed files
with
374 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
exception Unknown of Source.region * string | ||
|
||
val match_imports : Ast.module_ -> Eval.import list (* raises Unknown *) | ||
val match_imports : Kernel.module_ -> Eval.import list (* raises Unknown *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
open Parser | ||
open Ast | ||
open Kernel | ||
|
||
let convert_pos pos = | ||
{ Source.file = pos.Lexing.pos_fname; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open Ast | ||
open Kernel | ||
open Source | ||
open Printf | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
val print_module : Ast.module_ -> unit | ||
val print_module_sig : Ast.module_ -> unit | ||
val print_module : Kernel.module_ -> unit | ||
val print_module_sig : Kernel.module_ -> unit | ||
val print_value : Values.value option -> unit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
type command = command' Source.phrase | ||
and command' = | ||
| Define of Ast.module_ | ||
| Invoke of string * Ast.literal list | ||
| AssertInvalid of Ast.module_ * string | ||
| AssertReturn of string * Ast.literal list * Ast.literal option | ||
| AssertReturnNaN of string * Ast.literal list | ||
| AssertTrap of string * Ast.literal list * string | ||
type 'm command = 'm command' Source.phrase | ||
and 'm command' = | ||
| Define of 'm | ||
| Invoke of string * Kernel.literal list | ||
| AssertInvalid of 'm * string | ||
| AssertReturn of string * Kernel.literal list * Kernel.literal option | ||
| AssertReturnNaN of string * Kernel.literal list | ||
| AssertTrap of string * Kernel.literal list * string | ||
|
||
type script = command list | ||
type script = Ast.module_ command list | ||
type script' = Kernel.module_ command list | ||
|
||
val desugar : script -> script' | ||
|
||
exception Syntax of Source.region * string | ||
exception AssertFailure of Source.region * string | ||
|
||
val run : script -> unit | ||
val run : script' -> unit | ||
(* raises Check.Invalid, Eval.Trap, Eval.Crash, Failure *) | ||
|
||
val trace : string -> unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.