summary refs log tree commit diff stats
path: root/compiler/semmagic.nim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2016-01-26 09:40:44 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2016-01-26 10:10:08 +0100
commitcd574d197646f6d77bc6045d9bdc16982fc14548 (patch)
tree58bd4ce5c93fa12c089bea8de50cc4210ac821b3 /compiler/semmagic.nim
parent4246f660ea4ba7bab05811662eb53a87cc0cc049 (diff)
downloadNim-cd574d197646f6d77bc6045d9bdc16982fc14548.tar.gz
Promote "echo" syntax without parenthesis
Diffstat (limited to 'compiler/semmagic.nim')
0 files changed, 0 insertions, 0 deletions
d.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 */
#! stdtmpl(subsChar='?') | standard
#proc generateBuildBatchScript(c: ConfigData, winIndex, cpuIndex: int): string = 
#  result = "@echo off\nREM Generated by niminst\n"
SET CC=gcc
SET LINKER=gcc
SET COMP_FLAGS=?{c.ccompiler.flags}
SET LINK_FLAGS=?{c.linker.flags}
SET BIN_DIR=?{firstBinPath(c).toWin}

if EXIST ..\koch.nim SET BIN_DIR=..\bin

if NOT EXIST %BIN_DIR%\nul mkdir %BIN_DIR%

REM call the compiler:

#  block win32:
#    var linkCmd = ""
#    for ff in items(c.cfiles[winIndex][cpuIndex]):
#      let f = ff.toWin
ECHO %CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
CALL %CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
#      linkCmd.add(" " & changeFileExt(f, "o"))
IF ERRORLEVEL 1 (GOTO:END)
#    end for

ECHO %LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS%
CALL %LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS%

#  end block

:END
IF ERRORLEVEL 1 (
    ECHO FAILURE
    ECHO.
    ECHO CSource compilation failed. Please check that the gcc compiler is in
    ECHO the PATH environment variable, and that you are calling the batch script
    ECHO that matches the target architecture of the compiler.
) ELSE (
    ECHO SUCCESS
)
exit /b %ERRORLEVEL%