summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-09-08 10:19:12 +0200
committerAraq <rumpf_a@web.de>2015-09-08 10:22:15 +0200
commit494431e3b4bd6068d3457dbd61eb2670336096b0 (patch)
treeedc69506562e6b66fafa8125f08adf2fe95ba940
parent833a9344fad91a0ccf827e7dedcb41aa3eb2665a (diff)
downloadNim-494431e3b4bd6068d3457dbd61eb2670336096b0.tar.gz
gangbang support for NimScript
-rw-r--r--compiler/commands.nim11
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index dba117516..6b2f074e8 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -645,11 +645,18 @@ proc processSwitch*(pass: TCmdLinePass; p: OptParser) =
 proc processArgument*(pass: TCmdLinePass; p: OptParser;
                       argsCount: var int): bool =
   if argsCount == 0:
-    if pass != passCmd2: options.command = p.key
+    # nim filename.nims  is the same as "nim e filename.nims":
+    if p.key.endswith(".nims"):
+      options.command = "e"
+      options.gProjectName = unixToNativePath(p.key)
+      arguments = cmdLineRest(p)
+      result = true
+    elif pass != passCmd2:
+      options.command = p.key
   else:
     if pass == passCmd1: options.commandArgs.add p.key
     if argsCount == 1:
-      # support UNIX style filenames anywhere for portable build scripts:
+      # support UNIX style filenames everywhere for portable build scripts:
       options.gProjectName = unixToNativePath(p.key)
       arguments = cmdLineRest(p)
       result = true
d'>9e6fb3f69 ^
def61c9fc ^
9e6fb3f69 ^






def61c9fc ^
9e6fb3f69 ^

aa88e150d ^
52bb696cd ^


9e6fb3f69 ^
aa88e150d ^
def61c9fc ^
aa88e150d ^


55e7d91b3 ^
aa88e150d ^
def61c9fc ^
aa88e150d ^
def61c9fc ^
aa88e150d ^
b6b5a11be ^



9e6fb3f69 ^
9eb909baf ^
9eb909baf ^

9e6fb3f69 ^
9eb909baf ^

aa88e150d ^
def61c9fc ^
9e6fb3f69 ^

def61c9fc ^
aa88e150d ^

92b8fac94 ^
9eb909baf ^




aa88e150d ^
9e6fb3f69 ^

aa88e150d ^
9e6fb3f69 ^


aa88e150d ^

0b84ee167 ^


aa88e150d ^
773d17cd1 ^
def61c9fc ^
9e6fb3f69 ^
aa88e150d ^


9e6fb3f69 ^
29db0d858 ^

9e6fb3f69 ^



















aa88e150d ^
9e6fb3f69 ^

e9eab32e5 ^

0b84ee167 ^


aa88e150d ^
9e6fb3f69 ^

29db0d858 ^
9e6fb3f69 ^
0c49822b5 ^
aa88e150d ^
9e6fb3f69 ^
b731e6ef1 ^
92b8fac94 ^
9e6fb3f69 ^
aa88e150d ^
7f7b13a45 ^




45accd613 ^


9e6fb3f69 ^

7f7b13a45 ^
aa88e150d ^
7f7b13a45 ^
074f276c8 ^
92b8fac94 ^
9e6fb3f69 ^
aa88e150d ^
9e6fb3f69 ^

aa88e150d ^
9e6fb3f69 ^

69b32637b ^

9e6fb3f69 ^
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246

 
                            
                                         




                                                   
                                                                    

      
                                                                                 



























































































                                                                                
 

                                                                  
 






                                                                           
 

                                              
 


                              
                                                          
                                                                        
                                                                          


                                                         
                                   
                                                  
                                        
                                                   
 
                                          



                                              
                                                   
                    

                                                                 
                                          

                        
                           
 

                                         
 

                            
                                                         




                                                                                                                                           
 

                                                                                                    
                   


                                                    

                                       


                                      
                                                                       
                                          
                       
                                                                         


                         
                                        

                                                                                 



















                                                                                 
                                                 

                                                   

                                                                 


                                                             
 

                                                                
                                             
                          
                                                
 
                                                                  
                                  
                                                             
                                                                       
 




                                                                


                                   

                                                           
                  
                                                                 
                                                                               
                                   
                                  
                                                                                   
       

                                                                   
 

                                                              

                     
                                                                         
'n1733' href='#n1733'>1733
1734
1735
1736
1737
1738
1739
1740