template::adp_append_code (public)

 template::adp_append_code code [ nobreak ]

Defined in packages/acs-templating/tcl/parse-procs.tcl

Adds a line of code to the Tcl output from the compiler. Called by basically any adp custom tag implementation and also from developer support.

Parameters:
code (required)
A line of Tcl code
nobreak (optional)
Options:
-nobreak
Flag indicating that code should be appended to the current last line rather than adding a new line, for cases where code must continue on the same line, such as the "else" tag.

Testcases:
template_widget_file, adp_parse_tags
Source code:
    if { [string is space $code] } { return }

    variable parse_list

    if {$nobreak eq "-nobreak"} {

        set last_line [lindex $parse_list end]
        append last_line $code"
        lset parse_list end $last_line

    } else {

        lappend parse_list $code
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: