Moved the parseAST magics to evals.nim
Added string interpolation helper routines in parserutils
Added a proof-of-concept string interpolation user-land macros (currently, only as a test case):
the interpolated expression could either be transformed to
concat("literal string ", $(interpolated), " end") or
"literal string $1 end" % [$(interpolated)]
Added a very initial definition of Optional[T] generic type
A new overload of ParseIdent was added in hope to get around the fact that the
old one doesn't work correctly in macros, but the problem persists.
This commit is contained in:
parent
a28cf4e9cb
commit
dbcca9b3b9
6 changed files with 216 additions and 40 deletions
|
|
@ -208,6 +208,7 @@ proc evalOp(m: TMagic, n, a, b, c: PNode): PNode =
|
|||
of mNewString, mNewStringOfCap,
|
||||
mExit, mInc, ast.mDec, mEcho, mAssert, mSwap, mAppendStrCh,
|
||||
mAppendStrStr, mAppendSeqElem, mSetLengthStr, mSetLengthSeq,
|
||||
mParseExprToAst, mParseStmtToAst,
|
||||
mNLen..mNError, mEqRef:
|
||||
nil
|
||||
else: InternalError(a.info, "evalOp(" & $m & ')')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue