Module Inspector (.ml)

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
Parameters:
? : Parser.token
val descan : Parser.token -> string
Convert token to its (assumed) lexographical source
Parameters:
? : Parser.token
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
Parameters:
() : Lexing.lexbuf -> Parser.token
() : Lexing.lexbuf
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
Parameters:
() : Ast.lit
val inspect_ast_arith : Ast.arith -> string
Parameters:
() : Ast.arith
val inspect_ast_numtest : Ast.numtest -> string
Parameters:
() : Ast.numtest
val inspect_ast_combtest : Ast.combtest -> string
Parameters:
() : Ast.combtest
val inspect_ast_op : Ast.op -> string
Parameters:
() : Ast.op
val inspect_ast_expr : Ast.expr -> string
Parameters:
() : Ast.expr
val inspect_ast_var_def : Ast.var_def -> string
Parameters:
() : Ast.var_def
val inspect_ast_stmt : Ast.stmt -> string
Parameters:
() : Ast.stmt
val inspect_ast_clause : Ast.expr option * Ast.stmt list -> string
Parameters:
(opt_expr,body) : Ast.expr option * Ast.stmt list
val inspect_ast_class_section : Ast.class_section -> string
Parameters:
() : Ast.class_section
val inspect_ast_func_def : Ast.func_def -> string
Parameters:
() : Ast.func_def
val inspect_ast_member_def : Ast.member_def -> string
Parameters:
() : Ast.member_def
val inspect_ast_class_sections : Ast.class_sections_def -> string
Parameters:
() : Ast.class_sections_def
val inspect_ast_class_def : Ast.class_def -> string
Parameters:
() : Ast.class_def