Package Cheetah :: Module Compiler :: Class MethodCompiler
[show private | hide private]
[frames | no frames]

Class MethodCompiler

GenUtils --+
           |
          MethodCompiler

Known Subclasses:
AutoMethodCompiler

Method Summary
  __init__(self, methodName, classCompiler, initialMethodComment, decorator)
  __str__(self)
  addAssert(self, expr)
  addBreak(self, expr)
  addChunk(self, chunk)
  addClosure(self, functionName, argsList, parserComment)
  addContinue(self, expr)
  addDel(self, expr)
  addEcho(self, expr, rawExpr)
  addElif(self, expr, dedent, lineCol)
  addElse(self, expr, dedent, lineCol)
  addExcept(self, expr, dedent, lineCol)
  addFilteredChunk(self, chunk, filterArgs, rawExpr, lineCol)
  addFinally(self, expr, dedent, lineCol)
  addFor(self, expr, lineCol)
  addIf(self, expr, lineCol)
For a full #if ...
  addInclude(self, sourceExpr, includeFrom, isRaw)
  addIndentingDirective(self, expr, lineCol)
  addMethComment(self, comm)
  addMethDocString(self, line)
  addOneLineIf(self, expr, lineCol)
For a full #if ...
  addPass(self, expr)
  addPlaceholder(self, expr, filterArgs, rawPlaceholder, cacheTokenParts, lineCol, silentMode)
  addPSP(self, PSP)
  addRaise(self, expr)
  addRawText(self, text)
  addReIndentingDirective(self, expr, dedent, lineCol)
  addRepeat(self, expr, lineCol)
  addReturn(self, expr)
  addSet(self, expr, exprComponents, setStyle)
  addSilent(self, expr)
  addStrConst(self, strConst)
  addTernaryExpr(self, conditionExpr, trueExpr, falseExpr, lineCol)
For a single-lie #if ...
  addTry(self, expr, lineCol)
  addUnless(self, expr, lineCol)
  addWhile(self, expr, lineCol)
  addWriteChunk(self, chunk)
  addYield(self, expr)
  appendToPrevChunk(self, appendage)
  cleanupState(self)
Called by the containing class compiler instance
  closeFilterBlock(self)
  commitStrConst(self)
Add the code for outputting the pending strConst without chopping off any whitespace from it.
  dedent(self)
  docString(self)
  endCacheRegion(self)
  endCallRegion(self, regionTitle)
  endCaptureRegion(self)
  handleWSBeforeDirective(self)
Truncate the pending strCont to the beginning of the current line.
  indent(self)
  indentation(self)
  isErrorCatcherOn(self)
  methodBody(self)
  methodDef(self)
  methodName(self)
  methodSignature(self)
  nextCacheID(self)
  nextCallRegionID(self)
  nextCaptureRegionID(self)
  nextFilterRegionID(self)
  setCallArg(self, argName, lineCol)
  setErrorCatcher(self, errorCatcherName)
  setFilter(self, theFilter, isKlass)
  setMethodName(self, name)
  setMethodSignature(self, signature)
  setting(self, key)
  startCacheRegion(self, cacheInfo, lineCol, rawPlaceholder)
  startCallRegion(self, functionName, args, lineCol, regionTitle)
  startCaptureRegion(self, assignTo, lineCol)
  turnErrorCatcherOff(self)
  turnErrorCatcherOn(self)
  wrapCode(self)
  _appendToPrevStrConst(self, strConst)
  _endCallArg(self)
  _setupState(self)
  _unescapeCheetahVars(self, theString)
Unescape any escaped Cheetah $vars in the string.
  _unescapeDirectives(self, theString)
Unescape any escaped Cheetah $vars in the string.
    Inherited from GenUtils
  addGetTextVar(self, nameChunks)
Output something that gettext can recognize.
  genCacheInfo(self, cacheTokenParts)
Decipher a placeholder cachetoken
  genCacheInfoFromArgList(self, argList)
  genCheetahVar(self, nameChunks, plain)
  genNameMapperVar(self, nameChunks)
Generate valid Python code for a Cheetah $var, using NameMapper (Unified Dotted Notation with the SearchList).
  genPlainVar(self, nameChunks)
Generate Python code for a Cheetah $var without using NameMapper (Unified Dotted Notation with the SearchList).
  genTimeInterval(self, timeString)

Method Details

addIf(self, expr, lineCol=None)

For a full #if ... #end if directive

addOneLineIf(self, expr, lineCol=None)

For a full #if ... #end if directive

addTernaryExpr(self, conditionExpr, trueExpr, falseExpr, lineCol=None)

For a single-lie #if ... then .... else ... directive <condition> then <trueExpr> else <falseExpr>

cleanupState(self)

Called by the containing class compiler instance

commitStrConst(self)

Add the code for outputting the pending strConst without chopping off any whitespace from it.

handleWSBeforeDirective(self)

Truncate the pending strCont to the beginning of the current line.

_unescapeCheetahVars(self, theString)

Unescape any escaped Cheetah $vars in the string.

_unescapeDirectives(self, theString)

Unescape any escaped Cheetah $vars in the string.

Generated by Epydoc 2.1 on Sat Mar 4 13:36:27 2006 http://epydoc.sf.net