137:73d057b030d0 | 138:a426c1039655 |
---|---|
34 #include "commands.h" | 34 #include "commands.h" |
35 #include "lexer.h" | 35 #include "lexer.h" |
36 | 36 |
37 static List<CommandInfo*> Commands; | 37 static List<CommandInfo*> Commands; |
38 | 38 |
39 // ============================================================================ | 39 // _________________________________________________________________________________________________ |
40 // | 40 // |
41 void addCommandDefinition (CommandInfo* comm) | 41 void addCommandDefinition (CommandInfo* comm) |
42 { | 42 { |
43 // Ensure that there is no conflicts | 43 // Ensure that there is no conflicts |
44 for (CommandInfo* it : Commands) | 44 for (CommandInfo* it : Commands) |
51 } | 51 } |
52 | 52 |
53 Commands << comm; | 53 Commands << comm; |
54 } | 54 } |
55 | 55 |
56 // ============================================================================ | 56 // _________________________________________________________________________________________________ |
57 // Finds a command by name | 57 // Finds a command by name |
58 CommandInfo* findCommandByName (String fname) | 58 CommandInfo* findCommandByName (String fname) |
59 { | 59 { |
60 for (CommandInfo* comm : Commands) | 60 for (CommandInfo* comm : Commands) |
61 { | 61 { |
64 } | 64 } |
65 | 65 |
66 return null; | 66 return null; |
67 } | 67 } |
68 | 68 |
69 // ============================================================================ | 69 // _________________________________________________________________________________________________ |
70 // | 70 // |
71 // Returns the prototype of the command | 71 // Returns the prototype of the command |
72 // | 72 // |
73 String CommandInfo::signature() | 73 String CommandInfo::signature() |
74 { | 74 { |