MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / compile_command

Function compile_command

_pydevd_bundle/pydevconsole_code.py:127–145  ·  view source on GitHub ↗

r"""Compile a command and determine whether it is incomplete. Arguments: source -- the source string; may contain \n characters filename -- optional filename from which source was read; default " " symbol -- optional grammar start symbol; "single" (default) or

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

Source from the content-addressed store, hash-verified

125
126
127def compile_command(source, filename="<input>", symbol="single"):
128 r"""Compile a command and determine whether it is incomplete.
129
130 Arguments:
131
132 source -- the source string; may contain \n characters
133 filename -- optional filename from which source was read; default
134 "<input>"
135 symbol -- optional grammar start symbol; "single" (default) or "eval"
136
137 Return value / exceptions raised:
138
139 - Return a code object if the command is complete and valid
140 - Return None if the command is incomplete
141 - Raise SyntaxError, ValueError or OverflowError if the command is a
142 syntax error (OverflowError and ValueError can be produced by
143 malformed literals).
144 """
145 return _maybe_compile(_compile, source, filename, symbol)
146
147
148class Compile:

Callers 1

console_execFunction · 0.85

Calls 1

_maybe_compileFunction · 0.85

Tested by

no test coverage detected