Differences From Artifact [d5c37017fd]:
- File src/natools-s_expressions-interpreters.adb — part of check-in [6f257a4f4d] at 2014-05-08 18:36:49 on branch trunk — Move atom comparison function from Natools.S_Expressions.Interpreters to Natools.S_Expressions (user: nat size: 8671)
To Artifact [25b368150e]:
- File src/natools-s_expressions-interpreters.adb — part of check-in [179da1f3db] at 2014-05-11 20:04:28 on branch trunk — s_expressions-interpreters: add a String-based command addition, since it's the overwhelmingly most common use case (user: nat size: 8847)
| ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + + + + + + |
Name : in Atom;
Cmd : in Command'Class) is
begin
Self.Commands.Insert (Name, Cmd);
Self.Max_Length := Count'Max (Self.Max_Length, Name'Length);
end Add_Command;
procedure Add
(Self : in out Interpreter;
Name : in String;
Cmd : in Command'Class) is
begin
Self.Add_Command (To_Atom (Name), Cmd);
end Add;
function Has_Command (Self : Interpreter; Name : Atom) return Boolean is
begin
return Self.Commands.Contains (Name);
end Has_Command;
|
| ︙ |