File: HACKING

package info (click to toggle)
libtext-xslate-perl 3.5.9-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,108 kB
  • sloc: perl: 19,756; ansic: 214; pascal: 182; makefile: 9; cs: 8
file content (29 lines) | stat: -rw-r--r-- 1,207 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
NOTES FOR HACKERS

Easy evaluation:
    $ xslate -e 'Hello, <: $ARGV[0] :> world!' Xslate

Debugging options ($ENV{XSLATE}; or --debug for xslate(1)):
    dump=proto  Output preprocessed proto templates
    dump=token  Output token sequence
    dump=denote Output code denotation
    dump=gen    Output code generation
    dump=ast    Output abstract syntax tree
    dump=asm    Output xslate assembly
    dump=asm:ix Output xslate assembly with indexes
    dump=pp     Output Perl code PP::Booster generates
    optimize=0  Suppress optimization
    pp=verbose  Make error messages verbose (by Carp->import('verbose'))

Parser's terminology:
    arity  Symbol class; used while compiling
    bp     Binding power; or operator precedence
    nud    Null denotation; processing values and prefix operators
    led    Left denotation; processing infix and postfix operators
    std    Statement denotation; processing statements

Callbacks: functios, methods, and macros
tx_call_sv() is a thin wrapper to Perl_call_sv()
tx_funcall()      tries to call Perl fuctions
tx_proccall()     tries to call macros, or fallback to tx_funcall()
tx_methodcall()   tries to call Perl methods, or fallback to tx_proccall()