#include <potion.h>
|
static PN | potion_source_size (Potion *P, PN cl, PN self) |
|
static PN | potion_source_name (Potion *P, PN cl, PN self) |
|
static PN | potion_source_file (Potion *P, PN cl, PN self) |
|
static PN | potion_source_lineno (Potion *P, PN cl, PN self) |
|
static PN | potion_source_line (Potion *P, PN cl, PN self) |
|
static PN | potion_source_string (Potion *P, PN cl, PN self) |
|
static PN | potion_source_loc (Potion *P, PN cl, PN self) |
|
PN | potion_source_compile (Potion *P, PN cl, PN self, PN source, PN sig) |
|
PN | potion_source_load (Potion *P, PN cl, PN buf) |
|
PN | potion_source_dumpbc (Potion *P, PN cl, PN proto, PN options) |
|
PN | potion_source_dump (Potion *P, PN cl, PN self, PN backend, PN options) |
|
Definition at line 424 of file potion.h.
"size" method
- Returns
- number of ast trees: 1,2 or 3
Definition at line 64 of file ast.c.
"name" method
Definition at line 71 of file ast.c.
"file" method
- Returns
- filename of associated AST
Definition at line 79 of file ast.c.
static PN potion_source_lineno |
( |
Potion * |
P, |
|
|
PN |
cl, |
|
|
PN |
self |
|
) |
| |
"lineno" method
- Returns
- line number of associated AST
Definition at line 87 of file ast.c.
"line" method
- Returns
- line string of associated AST
Definition at line 95 of file ast.c.
static PN potion_source_string |
( |
Potion * |
P, |
|
|
PN |
cl, |
|
|
PN |
self |
|
) |
| |
"string" method of the AST Note: Does not output the AST type, filename nor lineno
Definition at line 103 of file ast.c.
"compile" method for PNSource, an AST fragment. Typically to add a function definition, but also objects, blocks, ... (Almost everything is a PNClosure)
- Parameters
-
source | PNProto or PN_NIL of the current closure definition stored in f->source of each block |
sig | PNSource signature tree or PN_NIL or PNTuple in P2, parsed via yy_sig() |
- Returns
- PNProto a closure
Definition at line 1039 of file compile.c.
dump (compiler) methods, default "bc". loads compile-"backend" extension.
- Parameters
-
backend | PNString - load a compile-"backend" module and call its dump"backend" method |
options | optional PNString TODO: serializable ascii, c, exe, jvm, .net |
Definition at line 1265 of file compile.c.
PNSource::PN_OBJECT_HEADER |
PNType vt; PNUniq uniq.
Definition at line 425 of file potion.h.
AST type, avoid -Wswitch (aligned access: 4+4+8+4+24)
Definition at line 426 of file potion.h.
struct PNSource* volatile PNSource::a[3] |
struct { ... } PNSource::loc |
bitfield of fileno and lineno
The documentation for this struct was generated from the following files: