Creates a new StylePatch object containing the provided styles. This is the only way to create a Patch object (the new class method is a private method).
Styles is an ordered set of lines. These lines may be separated by semicolons, or be items in a Rexx Array, or both.
-- Sample style patch file
-- =======================
--
-- Lines starting with "--" are comments and are ignored
--
-- Patch simple variable elements to display as bold black over 75% yellow
element EL.SIMPLE_VARIABLE #000:#cc0 bold
-- Patch method names to display as black over 75% magenta
name METHOD.NAME #000:#c0c
Style patches have a very simple format: they are arrays of strings consisting of:
"--", which
also are completely ignored."--" have been
discarded, all dashes "-" are replaced by blanks
" ". This can be very useful in certain contexts like
certain Linux shells, where enclosing arguments between quotes may be
cumbersome.Element class highlighting
Element can be abbreviated to E, and the
class name can omit the EL. prefix, if
desired.All set highlighting
All can be abbreviated to A, and the
set can omit the ALL. prefix, if desired.Name constantName highlighting
Name can be abbreviated to N, and the
constantName can omit the .NAME suffix, if
desired.#rgb,
#rrggbb, or one of the 147 standard CSS named colors defined
here.fg:bg (with no blanks), where fg and
bg are either #rgb, #rrggbb, or
one of the 147 CSS named colors defined
here.:#rgb,
:#rrggbb, or a colon immediately followed by one of the 147
standard CSS named colors defined
here.bold, italic or
underline.no, which has to be followed by one of
bold, italic or underline.::Method methodName
-- In this code fragment, the standard dark mode highlighting style is used.
-- Additionally, local variables are specially highlighted with a bold black
-- font over a yellow background, and the highlighting for method names is
-- modified to have a black foreground over a magenta background.
len = Length("String")
n = Pos("x", value)