Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
CommandCompiler Class Reference

Public Member Functions

def __init__
 
def __call__
 

Data Fields

 compiler
 

Detailed Description

Instances of this class have __call__ methods identical in
signature to compile_command; the difference is that if the
instance compiles program text containing a __future__ statement,
the instance 'remembers' and compiles all subsequent program texts
with the statement in force.

Definition at line 141 of file codeop.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 148 of file codeop.py.

149  def __init__(self,):
150  self.compiler = Compile()

Member Function Documentation

def __call__ (   self,
  source,
  filename = "<input>",
  symbol = "single" 
)

Definition at line 151 of file codeop.py.

References CommandCompiler.compiler.

152  def __call__(self, source, filename="<input>", symbol="single"):
153  r"""Compile a command and determine whether it is incomplete.
154 
155  Arguments:
156 
157  source -- the source string; may contain \n characters
158  filename -- optional filename from which source was read;
159  default "<input>"
160  symbol -- optional grammar start symbol; "single" (default) or
161  "eval"
162 
163  Return value / exceptions raised:
164 
165  - Return a code object if the command is complete and valid
166  - Return None if the command is incomplete
167  - Raise SyntaxError, ValueError or OverflowError if the command is a
168  syntax error (OverflowError and ValueError can be produced by
169  malformed literals).
170  """
171  return _maybe_compile(self.compiler, source, filename, symbol)

Field Documentation

compiler

Definition at line 149 of file codeop.py.


The documentation for this class was generated from the following file: