/src/tools/interpreter/builtins/liberty_interpreter_external_type_function_builtins.e
http://github.com/tybor/Liberty · Specman e · 44 lines · 26 code · 4 blank · 14 comment · 0 complexity · e5cdbeb47fd1a7045c9f66cc6f4ce9af MD5 · raw file
- -- This file is part of Liberty Eiffel.
- --
- -- Liberty Eiffel is free software: you can redistribute it and/or modify
- -- it under the terms of the GNU General Public License as published by
- -- the Free Software Foundation, version 3 of the License.
- --
- -- Liberty Eiffel is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warranty of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
- --
- class LIBERTY_INTERPRETER_EXTERNAL_TYPE_FUNCTION_BUILTINS
- inherit
- LIBERTY_INTERPRETER_EXTERNAL_TYPE_ROUTINE_BUILTINS
- redefine call
- end
- creation {LIBERTY_INTERPRETER_EXTERNAL_BUILTIN_CALL}
- make
- feature {LIBERTY_INTERPRETER_EXTERNAL_BUILTIN_CALL}
- call (builtin_call: LIBERTY_INTERPRETER_FEATURE_CALL): LIBERTY_INTERPRETER_OBJECT is
- local
- target: LIBERTY_INTERPRETER_AGENT
- do
- builtin_call.evaluate_parameters
- inspect
- builtin_call.name
- when "item" then
- target ::= builtin_call.target
- Result := target.item_agent(builtin_call.parameters, builtin_call.position)
- when "call" then
- target ::= builtin_call.target
- target.call_agent(builtin_call.parameters, builtin_call.position)
- else
- last_call_failed := True
- end
- end
- end -- class LIBERTY_INTERPRETER_EXTERNAL_TYPE_FUNCTION_BUILTINS