commentPreParserobjectinput.t[749]

The "comment" pre-parser. If the command line starts with a special prefix string (by default, "*", but this can be changed via our commentPrefix property), this pre-parser intercepts the command, treating it as a comment from the player and otherwise ignoring the entire input line. The main purpose is to give players a way to put comments into recorded transcripts, as notes to themselves when later reviewing the transcripts or as notes to the author when submitting play-testing feedback.

commentPreParser :   StringPreParser

Superclass Tree   (in declaration order)

commentPreParser
        StringPreParser
                PreinitObject
                        ModuleExecObject
                                object

Summary of Properties  

commentPrefix  leadPat  runOrder  warningCount 

Inherited from StringPreParser :
isActive  regList  regListSorted 

Inherited from PreinitObject :
execBeforeMe  reverseGlobalSymbols 

Inherited from ModuleExecObject :
execAfterMe  hasInitialized_  isDoingExec_  isExecuted_ 

Summary of Methods  

doParsing 

Inherited from StringPreParser :
construct  execute  registerPreParser  runAll 

Inherited from ModuleExecObject :
_execute  classExec 

Properties  

commentPrefixinput.t[796]

The comment prefix. You can change this to any character, or to any sequence of characters (longer sequences, such as '//', will work fine). If a command line starts with this exact string (or starts with whitespace followed by this string), we'll consider the line to be a comment.

leadPatinput.t[808]
The leading-whitespace pattern. We skip any text that matches this pattern at the start of a command line before looking for the comment prefix.

If you don't want to allow leading whitespace before the comment prefix, you can simply change this to '' - a pattern consisting of an empty string always matches zero characters, so it will prevent us from skipping any leading charactres in the player's input.

runOrderOVERRIDDENinput.t[825]
Use a lower execution order than the default, so that we run before most other pre-parsers. Most other pre-parsers are written to handle actual commands, so it's usually just a waste of time to have them look at comments at all - and can occasionally be problematic, since the free-form text of a comment could confuse a pre-parser that's expecting a more conventional command format. When the comment pre-parser detects a comment, it halts any further processing of the command - so by running ahead of other pre-parsers, we'll effectively bypass other pre-parsers when we detect a comment.

warningCountinput.t[811]
warning count for entering comments without SCRIPT in effect

Methods  

doParsing (str, which)OVERRIDDENinput.t[750]

no description available

Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1