statement walk callback functions, where we can stash additional
information without breaking all of the callers.
At present, the only information in the context is the parent
statement or expression.
Swift SVN r860
function into all of the expression nodes. Re-implement
Expr::getStartLoc() in terms of this function, and add it's brother
Expr::getEndLoc(), removing the specialized implementations.
Clean up the source ranges of implicitly-created tuple expressions in
the process.
Swift SVN r855
aren't needed for the lexer proper (which just needs a buffer to dig
through). Also, make it possible to suppress lexer diagnostics merely
by not giving it a diagnostic engine to work with.
Swift SVN r852
actually render emitted diagnostics. This is both a useful
generalization (we expect to have a number of other
DiagnosticConsumers down the road, as Clang does) and is also
important now to avoid a layering violation when adjusting the source
location at the end of a SourceRange to the end of the token.
Swift SVN r850
Note that I had to re-implement llvm::Optional, since it lamely requires a default constructor. At some point, I'll push a proper implementation back to LLVM.
Swift SVN r845
declarations, but they are explicitly allowed at translation unit scope.
This also introduces a parseDecl method which does the obvious thing.
Swift SVN r830
forcing them to int64 all the time. Now the integer_literal_type in the standard library
is only used to resolve ambiguity in expressions. Among other amazing things, we now
correctly accept:
var x8 : int8 = 4
without a cast.
This still isn't doing any bounds checking and isn't checking the inferred type to tell if
it is compatible with integer literals (i.e. has a primitive conversion function from the
LLVM IR type). Enough for now though.
This is progress towards rdar://10357238.
Swift SVN r814
making it a real part of the AST. Also, rework TUModuleCache to do its computation
when it is constructed, instead of trying in each query.
Swift SVN r809
Module class. Add a new Module.cpp file to implement this (along with
the existing caching strategy, if you're curious). This eliminates the
parallel 'ModuleProvider' heirarchy.
Swift SVN r802
their ASTContext without bloating everything. Basically, now instead of having
a canonical type point to itself when canonical, it points to the ASTContext
when canonical. This means that Canonical types always have direct access to
their context and non-canonical ones just indirect through the canonical type
pointer to get to it (so it's two jumps away) by using a PointerUnion.
This should make type manipulation more straight-forward.
While we're at it, we actually memoize type canonicalization. Before we
forgot to remember the result in the canonical type pointer in Type.
Swift SVN r755