commentPreParserobjectinput.t[866]

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  warningCount 

Inherited from StringPreParser :
regList  regListSorted  runOrder 

Inherited from ModuleExecObject :
execAfterMe  execBeforeMe  hasInitialized_  isDoingExec_  isExecuted_ 

Summary of Methods  

doParsing 

Inherited from StringPreParser :
construct  execute  registerPreParser  runAll 

Inherited from ModuleExecObject :
_execute  classExec 

Properties  

commentPrefixinput.t[913]

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[925]
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.

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

Methods  

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

no description available

TADS 3 Library Manual
Generated on 9/8/2006 from TADS version 3.0.11