이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

Macro Definition Syntax

2015년 2월 21일 오후 10:23

Deprecated fromv5.3.0(seeProcedure Definition Syntax)


What follows is a formal presentation of the syntax of the \define pragma, using railroad diagrams. A simpler overview is also available.

\definespacenameparamsspacerest

space denotes a sequence of whitespace characters.

The macro's name is a sequence of non-whitespace characters other than ( or >.

The parameter declaration list (params) has the following syntax:

(sepparamsep)

The parameter separator (sep) is any sequence of characters that does not match a param-name. Among other things, this includes commas, spaces and linefeeds.

A param-name is a sequence of letters (AZ, az), digits (09), hyphens (-) and underscores (_).

Each individual param has the following syntax:

param-namespace:spacedefault)

The optional default value of a parameter is specified as follows:

"""anything but """""""anything but ""'anything but ''[[anything but ]]]anything but ' " or whitespace

The rest of the definition has the following syntax:

snippetlfsnippetlf\endspacelf

lf denotes a linefeed.

The snippet is any sequence of characters that doesn't terminate the macro definition. That is to say, a single-line snippet cannot contain a linefeed, and a multi-line snippet cannot contain \end on a line of its own.

The snippet can contain placeholders with the following syntax:

$name$$(name)$