Commit 0ee7c0c9 authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Rename pragma => directive in source

parent daa3f7f7
...@@ -126,7 +126,7 @@ def parse_command_line(args): ...@@ -126,7 +126,7 @@ def parse_command_line(args):
options.emit_linenums = True options.emit_linenums = True
elif option in ("-X", "--directive"): elif option in ("-X", "--directive"):
try: try:
options.pragma_overrides = Options.parse_option_list(pop_arg()) options.compiler_directives = Options.parse_option_list(pop_arg())
except ValueError, e: except ValueError, e:
sys.stderr.write("Error in compiler directive: %s\n" % e.message) sys.stderr.write("Error in compiler directive: %s\n" % e.message)
sys.exit(1) sys.exit(1)
......
...@@ -60,14 +60,14 @@ class Context(object): ...@@ -60,14 +60,14 @@ class Context(object):
# include_directories [string] # include_directories [string]
# future_directives [object] # future_directives [object]
def __init__(self, include_directories, pragma_overrides): def __init__(self, include_directories, compiler_directives):
#self.modules = {"__builtin__" : BuiltinScope()} #self.modules = {"__builtin__" : BuiltinScope()}
import Builtin, CythonScope import Builtin, CythonScope
self.modules = {"__builtin__" : Builtin.builtin_scope} self.modules = {"__builtin__" : Builtin.builtin_scope}
self.modules["cython"] = CythonScope.create_cython_scope(self) self.modules["cython"] = CythonScope.create_cython_scope(self)
self.include_directories = include_directories self.include_directories = include_directories
self.future_directives = set() self.future_directives = set()
self.pragma_overrides = pragma_overrides self.compiler_directives = compiler_directives
self.pxds = {} # full name -> node tree self.pxds = {} # full name -> node tree
...@@ -113,7 +113,7 @@ class Context(object): ...@@ -113,7 +113,7 @@ class Context(object):
NormalizeTree(self), NormalizeTree(self),
PostParse(self), PostParse(self),
_specific_post_parse, _specific_post_parse,
InterpretCompilerDirectives(self, self.pragma_overrides), InterpretCompilerDirectives(self, self.compiler_directives),
_align_function_definitions, _align_function_definitions,
ConstantFolding(), ConstantFolding(),
FlattenInListTransform(), FlattenInListTransform(),
...@@ -526,7 +526,7 @@ def create_default_resultobj(compilation_source, options): ...@@ -526,7 +526,7 @@ def create_default_resultobj(compilation_source, options):
def run_pipeline(source, options, full_module_name = None): def run_pipeline(source, options, full_module_name = None):
# Set up context # Set up context
context = Context(options.include_path, options.pragma_overrides) context = Context(options.include_path, options.compiler_directives)
# Set up source object # Set up source object
cwd = os.getcwd() cwd = os.getcwd()
...@@ -579,7 +579,7 @@ class CompilationOptions(object): ...@@ -579,7 +579,7 @@ class CompilationOptions(object):
defaults to true when recursive is true. defaults to true when recursive is true.
verbose boolean Always print source names being compiled verbose boolean Always print source names being compiled
quiet boolean Don't print source names in recursive mode quiet boolean Don't print source names in recursive mode
pragma_overrides dict Overrides for pragma options (see Options.py) compiler_directives dict Overrides for pragma options (see Options.py)
Following options are experimental and only used on MacOSX: Following options are experimental and only used on MacOSX:
...@@ -767,7 +767,7 @@ default_options = dict( ...@@ -767,7 +767,7 @@ default_options = dict(
timestamps = None, timestamps = None,
verbose = 0, verbose = 0,
quiet = 0, quiet = 0,
pragma_overrides = {}, compiler_directives = {},
emit_linenums = False, emit_linenums = False,
) )
if sys.platform == "mac": if sys.platform == "mac":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment