Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactor injectdestructors (#12295) | Clyybber | 2019-10-01 | 1 | -1/+0 |
| | | | One improvement over #devel is visible in the transformation of getEnv. With this approach we move to result whenever possible. | ||||
* | Fix spellings (#12277) [backport] | Federico Ceratto | 2019-09-27 | 1 | -2/+2 |
| | |||||
* | Small ast.nim cleanup (#12156) | Clyybber | 2019-09-09 | 1 | -22/+22 |
| | | | | | * Remove sonsLen * Use Indexable | ||||
* | Merge branch 'devel' into uint-range-checks | Araq | 2019-09-02 | 1 | -2/+1 |
|\ | |||||
| * | Support iterators returning lent T (#11938) | cooldome | 2019-08-31 | 1 | -2/+1 |
| | | | | | | | | | | | | | | * lent iterators * rebase tests * update changelog * fix comments, more tests | ||||
* | | minor stuff | Arne Döring | 2019-08-27 | 1 | -1/+1 |
|/ | |||||
* | removed unused imports [refactoring] | Andreas Rumpf | 2019-08-08 | 1 | -1/+1 |
| | |||||
* | int128 on firstOrd, lastOrd and lengthOrd (#11701) | Arne Döring | 2019-08-07 | 1 | -2/+2 |
| | | | | * fixes #11847 | ||||
* | [refactoring] remove unused imports in the compiler and in some stdlib modules | Araq | 2019-07-18 | 1 | -2/+2 |
| | |||||
* | fixes #11683 | Araq | 2019-07-10 | 1 | -5/+6 |
| | |||||
* | fixes #8316 (#11673) | Andreas Rumpf | 2019-07-06 | 1 | -7/+15 |
| | |||||
* | fix complex typdesc iterators | Jasper Jenkins | 2019-05-08 | 1 | -0/+1 |
| | |||||
* | Replace countup(x, y) with x .. y | Clyybber | 2019-05-07 | 1 | -3/+3 |
| | |||||
* | Replace countup(x, y-1) with x ..< y | Clyybber | 2019-05-07 | 1 | -9/+9 |
| | |||||
* | fixes #11050 | Araq | 2019-04-17 | 1 | -0/+2 |
| | |||||
* | dfa.nim: track object/tuple field accesses more precisely; sink(o.x); ↵ | Araq | 2019-04-16 | 1 | -2/+2 |
| | | | | sink(o.y) needs to compile; activate the tuple unpacking transf.nim bugfix | ||||
* | make strscans module work with --newruntime | Andreas Rumpf | 2019-04-14 | 1 | -1/+1 |
| | pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */#
#
# The Nim Compiler
# (c) Copyright 2012 Andreas Rumpf
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.
#
# This module handles the reading of the config file.
import
llstream, commands, os, strutils, msgs, lexer, ast,
options, idents, wordrecg, strtabs, lineinfos, pathutils, scriptconfig
when defined(nimPreviewSlimSystem):
import std/syncio
# ---------------- configuration file parser -----------------------------
# we use Nim's lexer here to save space and work
proc ppGetTok(L: var Lexer, tok: var Token) =
# simple filter
rawGetTok(L, tok)
while tok.tokType in {tkComment}: rawGetTok(L, tok)
proc parseExpr(L: var Lexer, tok: var Token; config: ConfigRef): bool
proc parseAtom(L: var Lexer, tok: var Token; config: ConfigRef): bool =
if tok.tokType == tkParLe:
ppGetTok(L, tok)
result = parseExpr(L, tok, config)
if tok.tokType == tkParRi: ppGetTok(L, tok)
else: lexMessage(L, errGenerated, "expected closing ')'")
elif tok.tokType == tkNot:
ppGetTok(L, tok)
result = not parseAtom(L, tok, config)
else:
result = isDefined(config, tok.ident.s)
ppGetTok(L, tok)
proc parseAndExpr(L: var Lexer, tok: var Token; config: ConfigRef): bool =
result = parseAtom(L, tok, config)
while tok.tokType == tkAnd:
ppGetTok(L, tok) # skip "and"
var b = parseAtom(L, tok, config)
result = result and b
proc parseExpr(L: var Lexer, tok: var Token; config: ConfigRef): bool =
result = parseAndExpr(L, tok, config)
while tok.tokType == tkOr:
ppGetTok(L, tok) # skip "or"
var b = parseAndExpr(L, tok, config)
result = result or b
proc evalppIf(L: var Lexer, tok: var Token; config: ConfigRef)olspan='5' class='logmsg'>
Fixes #9177
| ||||
* | fixes some bug | Andreas Rumpf | 2019-02-06 | 1 | -0/+1 |
| | |||||
* | Show lineinfo of for in yield (#9779) | Alexander Ivanov | 2018-12-13 | 1 | -0/+5 |
| | |||||
* | VM: don't inject destructor calls, refs #7041 | Andreas Rumpf | 2018-11-06 | 1 | -13/+16 |
| | |||||
* | Transf minor code optimization (#9433) | cooldome | 2018-10-19 | 1 | -37/+12 |
| | |||||
* | Change the order of compilation passes, transformation is made lazy at code ↵ | cooldome | 2018-10-18 | 1 | -22/+42 |
| | | | | | | | | | | | | | | | gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux | ||||
* | fixes #5519 | Araq | 2018-10-18 | 1 | -3/+6 |
| | |||||
* | fixes #7972 | Araq | 2018-10-18 | 1 | -10/+13 |
| | |||||
* | Field checks for everybody (#8957) | LemonBoy | 2018-10-09 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | * Field checks for JS backend * Clean nkCall nodes with no arguments Generating a nkEmpty in place of no arguments makes no sense form the AST point of view and also trips up the VM codegen. * Field checks for VM backend * Test case for #6612 This patchset fixes #6612 * Add test case for LHS double evaluation * Prevent LHS double-eval for JS backend * Prevent double evaluation in VM backend | ||||
* | Fix transformation of yield in inline context (#9135) | LemonBoy | 2018-10-09 | 1 | -15/+28 |
| | | | | | | When the loop variables are part of the envP block it is not safe to use a nkFastAsgn. Fixes #2656 | ||||
* | Make the registered passes local to the ModuleGraph (#9259) | LemonBoy | 2018-10-09 | 1 | -1/+1 |
| | | | Closes #9068 | ||||
* | enable destructors for top level statements; needs to be documented | Andreas Rumpf | 2018-09-24 | 1 | -4/+4 |
| | |||||
* | Revert #7964 | LemonBoy | 2018-09-21 | 1 | -6/+5 |
| | | | | | | | Somehow the test case doesn't crash anymore and the regression in the doc generation is fixed. Fixes #9019 | ||||
* | fixes #1616; fixes 'nim doc' regressions | Andreas Rumpf | 2018-09-17 | 1 | -1/+2 |
| | |||||
* | Fix AST generation for case statements (#8908) | LemonBoy | 2018-09-07 | 1 | -1/+5 |
| | | | Fixes #7534 | ||||
* | fixes merge conflict | Andreas Rumpf | 2018-08-19 | 1 | -5/+6 |
|\ | |||||
| * | Fix unsound transform pass (#8633) | LemonBoy | 2018-08-14 | 1 | -0/+4 |
| | | | | | | | | | | When a `var openArray[T]` function parameter goes trough the `transformAddrDeref` pass we may lose the `var` specifier, leading to nasty crashes at runtime. | ||||
| * | Mysterious fix for #8550 (#8561) | LemonBoy | 2018-08-12 | 1 | -5/+2 |
| | | | | | | | | Replacing the `for` body with a nkEmpty node is not the right thing to do. | ||||
* | | more progress on destructor based strings | Andreas Rumpf | 2018-07-13 | 1 | -4/+4 |
|/ | |||||
* | make tests green again | Andreas Rumpf | 2018-07-05 | 1 | -0/+2 |
| | |||||
* | allow referencing other parameters in default parameter values | Zahary Karadjov | 2018-06-16 | 1 | -0/+46 |
| | | | | | | | | fix #7756 fix #1201 fix #7000 fix #3002 fix #1046 | ||||
* | fixes yet another merge conflict | Araq | 2018-06-11 | 1 | -1/+1 |
|\ | |||||
| * | Removed oldIterTranf feature | Yuriy Glukhov | 2018-06-10 | 1 | -1/+1 |
| | | |||||
* | | fixex merge conflicts | Araq | 2018-06-08 | 1 | -2/+6 |
|\| | |||||
| * | Merge branch 'devel' into yield-in-try | Yuriy Glukhov | 2018-05-15 | 1 | -52/+57 |
| |\ |