From 70fe9266ce1ccb4fe964b831a7ab61f0d6262111 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 16 Dec 2014 00:58:36 -0400 Subject: + Strings now have escape characters. + Characters have been added. % Unicode support is missing... --- src/lang/compiler.clj | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/lang/compiler.clj') diff --git a/src/lang/compiler.clj b/src/lang/compiler.clj index e7d1ed582..b29bc38d1 100644 --- a/src/lang/compiler.clj +++ b/src/lang/compiler.clj @@ -73,15 +73,24 @@ (cond (instance? java.lang.Integer ?literal) (doto *writer* (.visitTypeInsn Opcodes/NEW (->class "java.lang.Integer")) - (.visitInsn Opcodes/DUP)(.visitLdcInsn ?literal) + (.visitInsn Opcodes/DUP) + (.visitLdcInsn ?literal) (.visitMethodInsn Opcodes/INVOKESPECIAL (->class "java.lang.Integer") "" "(I)V")) (instance? java.lang.Float ?literal) (doto *writer* (.visitTypeInsn Opcodes/NEW (->class "java.lang.Float")) - (.visitInsn Opcodes/DUP)(.visitLdcInsn ?literal) + (.visitInsn Opcodes/DUP) + (.visitLdcInsn ?literal) (.visitMethodInsn Opcodes/INVOKESPECIAL (->class "java.lang.Float") "" "(F)V")) + (instance? java.lang.Character ?literal) + (doto *writer* + (.visitTypeInsn Opcodes/NEW (->class "java.lang.Character")) + (.visitInsn Opcodes/DUP) + (.visitLdcInsn ?literal) + (.visitMethodInsn Opcodes/INVOKESPECIAL (->class "java.lang.Character") "" "(C)V")) + (instance? java.lang.Boolean ?literal) (if ?literal ;; (.visitLdcInsn *writer* (int 1)) -- cgit v1.2.3