summary refs log tree commit diff stats
path: root/doc/tools.txt
diff options
context:
space:
mode:
authorGrzegorz Adam Hankiewicz <gradha@imap.cc>2012-12-18 19:33:04 +0100
committerGrzegorz Adam Hankiewicz <gradha@imap.cc>2012-12-18 19:33:04 +0100
commitcb43de875aa611d9c5eab49b59984202f0e11edc (patch)
treeeb8fb654b7a7d64ad52e25103105a686f5b992aa /doc/tools.txt
parentda944e331fd7b02cc380dd2112a4d3559ce4104b (diff)
downloadNim-cb43de875aa611d9c5eab49b59984202f0e11edc.tar.gz
Adds link to external nimrod-crossplatform-todo repository.
Diffstat (limited to 'doc/tools.txt')
0 files changed, 0 insertions, 0 deletions
2009-12-07 01:23:19 +0100 version 0.8.5: added Nimrod version of the compiler' href='/ahoang/Nim/commit/rod/condsyms.nim?h=devel&id=e254741541b0389dfb0b675116c76a6a144b90b7'>e25474154 ^
c8bebe92e ^

e25474154 ^
61e57cfa1 ^

740527813 ^
61e57cfa1 ^

94d1aa510 ^
61e57cfa1 ^

94d1aa510 ^
61e57cfa1 ^

c8bebe92e ^
e25474154 ^
61e57cfa1 ^
e25474154 ^
61e57cfa1 ^
c8bebe92e ^
dd806cafa ^
61e57cfa1 ^
5e15dec17 ^
61e57cfa1 ^
2df9b442c ^





5506e8491 ^
b961e47bf ^
5e839d50b ^
a7911addf ^
dbf9117c5 ^
a639824e5 ^
1e6aef62b ^
8d3966923 ^
cabbcd411 ^
87815cbdf ^
b3cecddd6 ^
8ef66b973 ^
a8edf67a2 ^
9c4a60193 ^
adf8eea4d ^
f04d21f27 ^
5e368f363 ^
f7f3a25be ^
3308d2658 ^
762ade117 ^
8d1a5dc8e ^
33814cf63 ^
399c5e38b ^
6baca5869 ^
ed5b7cbac ^
f64f9e50c ^
4948cf3b4 ^
599b5d6dc ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

 
                            
                                         






                                                   
      
                                     
 

                   
 

                                                                                     
 

                                                            
 

                                                                      
 

                                                               
                                
 
                                                         
            
                                 
                                  
 
                                            
                                            
                                                    





                                 
                          
                              
                                     
                                           
                          
                          
                         
                              
                                 
                                  
                               
                           
                                        
                                
                            
                                 
                                      
                                       
                                               
                            
                                        
                           
                                 
                            
                              
                          
                                     
                           
#
#
#           The Nim Compiler
#        (c) Copyright 2015 Andreas Rumpf
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

# This module handles the conditional symbols.

import
  strtabs, platform, strutils, idents

const
  catNone = "false"

proc defineSymbol*(symbols: StringTableRef; symbol: string, value: string = "true") =
  symbols[symbol] = value

proc undefSymbol*(symbols: StringTableRef; symbol: string) =
  symbols[symbol] = catNone

#proc lookupSymbol*(symbols: StringTableRef; symbol: string): string =
#  result = if isDefined(symbol): gSymbols[symbol] else: nil

iterator definedSymbolNames*(symbols: StringTableRef): string =
  for key, val in pairs(symbols):
    if val != catNone: yield key

proc countDefinedSymbols*(symbols: StringTableRef): int =
  result = 0
  for key, val in pairs(symbols):
    if val != catNone: inc(result)

proc initDefines*(symbols: StringTableRef) =
  # for bootstrapping purposes and old code:
  template defineSymbol(s) = symbols.defineSymbol(s)
  defineSymbol("nimhygiene")
  defineSymbol("niminheritable")
  defineSymbol("nimmixin")
  defineSymbol("nimeffects")
  defineSymbol("nimbabel")
  defineSymbol("nimcomputedgoto")
  defineSymbol("nimunion")
  defineSymbol("nimnewshared")
  defineSymbol("nimrequiresnimframe")
  defineSymbol("nimparsebiggestfloatmagic")
  defineSymbol("nimalias")
  defineSymbol("nimlocks")
  defineSymbol("nimnode")
  defineSymbol("nimnomagic64")
  defineSymbol("nimvarargstyped")
  defineSymbol("nimtypedescfixed")
  defineSymbol("nimKnowsNimvm")
  defineSymbol("nimArrIdx")
  defineSymbol("nimImmediateDeprecated")
  defineSymbol("nimNewShiftOps")
  defineSymbol("nimDistros")
  defineSymbol("nimHasCppDefine")
  defineSymbol("nimGenericInOutFlags")
  when false: defineSymbol("nimHasOpt")
  defineSymbol("nimNoArrayToCstringConversion")
  defineSymbol("nimNewRoof")
  defineSymbol("nimHasRunnableExamples")
  defineSymbol("nimNewDot")
  defineSymbol("nimHasNilChecks")
  defineSymbol("nimSymKind")
  defineSymbol("nimVmEqIdent")
  defineSymbol("nimNoNil")
  defineSymbol("nimNoZeroTerminator")
  defineSymbol("nimNotNil")