module Inspector: sig
.. end
Provides functionality for examining values used in the compilation pipeline.
val token_to_string : Parser.token -> string
Convert a given token to a string representation for output
val descan : Parser.token -> string
Convert token to its (assumed) lexographical source
val token_list : (Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Parser.token list
Given a lexing function and a lexing buffer, consume tokesn until
the end of file is reached. Return the generated tokens.
Returns A list of scanned tokens
val from_channel : Pervasives.in_channel -> Parser.token list
Scan a list of tokens from an input file.
Returns A list of tokens taken from a source
Parameters: |
source |
: |
Pervasives.in_channel
A channel to get tokens from
|
|
val pprint_token_list : string -> Parser.token list -> unit
Print out a list of tokens with a specific header and some extra margins
Returns Only returns a unit
Parameters: |
header |
: |
string
A nonsemantic string to preface our list
|
toks |
: |
Parser.token list
A list of tokens
|
|
val pprint_token_lines : string -> (int * Parser.token list * bool) list -> unit
Print out de-whitespacing lines (see print_token_line) for various lines, but with a header.
Returns Only returns a unit
Parameters: |
header |
: |
string
A nonsemantic string to preface our list
|
lines |
: |
(int * Parser.token list * bool) list
A list of line representations (number of spaces, if it ends in a colon, a list of tokens)
|
|
val inspect_ast_lit : Ast.lit -> string
val inspect_ast_arith : Ast.arith -> string
val inspect_ast_numtest : Ast.numtest -> string
val inspect_ast_combtest : Ast.combtest -> string
val inspect_ast_op : Ast.op -> string
val inspect_ast_expr : Ast.expr -> string
val inspect_ast_var_def : Ast.var_def -> string
val inspect_ast_stmt : Ast.stmt -> string
val inspect_ast_clause : Ast.expr option * Ast.stmt list -> string
val inspect_ast_class_section : Ast.class_section -> string
val inspect_ast_func_def : Ast.func_def -> string
val inspect_ast_member_def : Ast.member_def -> string
val inspect_ast_class_sections : Ast.class_sections_def -> string
val inspect_ast_class_def : Ast.class_def -> string