diff options
Diffstat (limited to 'src/literal.cpp')
-rw-r--r-- | src/literal.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/literal.cpp b/src/literal.cpp new file mode 100644 index 0000000..79da059 --- /dev/null +++ b/src/literal.cpp @@ -0,0 +1,37 @@ +/* This file is part of the sirit project. + * Copyright (c) 2018 ReinUsesLisp + * This software may be used and distributed according to the terms of the GNU + * Lesser General Public License version 2.1 or any later version. + */ + +#include "sirit/sirit.h" +#include "common_types.h" +#include "operand.h" + +namespace Sirit { + +Operand* Module::Literal(u32 value) { + return new LiteralNumber(value); +} + +Operand* Module::Literal(u64 value) { + return new LiteralNumber(value); +} + +Operand* Module::Literal(s32 value) { + return new LiteralNumber(value); +} + +Operand* Module::Literal(s64 value) { + return new LiteralNumber(value); +} + +Operand* Module::Literal(f32 value) { + return new LiteralNumber(value); +} + +Operand* Module::Literal(f64 value) { + return new LiteralNumber(value); +} + +} // namespace Sirit |