compiler/TCompilerOptions.st
changeset 16 17a2d1d9f205
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/TCompilerOptions.st	Fri Sep 25 03:51:15 2015 +0100
@@ -0,0 +1,98 @@
+"
+    Copyright (C) 2015-now Jan Vrany
+
+    This code is not an open-source (yet). You may use this code
+    for your own experiments and projects, given that:
+
+    * all modification to the code will be sent to the
+      original author for inclusion in future releases
+    * this is not used in any commercial software
+
+    This license is provisional and may (will) change in
+    a future.
+"
+"{ Package: 'jv:tea/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+TObjectWithProperties subclass:#TCompilerOptions
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Compiler'
+!
+
+!TCompilerOptions class methodsFor:'documentation'!
+
+copyright
+"
+    Copyright (C) 2015-now Jan Vrany
+
+    This code is not an open-source (yet). You may use this code
+    for your own experiments and projects, given that:
+
+    * all modification to the code will be sent to the
+      original author for inclusion in future releases
+    * this is not used in any commercial software
+
+    This license is provisional and may (will) change in
+    a future.
+"
+! !
+
+!TCompilerOptions methodsFor:'accessing'!
+
+optionAt: option
+    ^ self propertyAt: option
+
+    "Created: / 24-09-2015 / 16:12:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+optionAt: option default: default
+    ^ self propertyAt: option ifAbsent:[ default ]
+
+    "Created: / 24-09-2015 / 16:13:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+optionAt: option put: value
+    ^ self propertyAt: option put: value
+
+    "Created: / 24-09-2015 / 16:13:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TCompilerOptions methodsFor:'options'!
+
+emitIR
+    ^ self optionAt: #emitIR default: false
+
+    "Created: / 24-09-2015 / 16:38:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+emitIR: aBoolean
+    self optionAt: #emitIR put: aBoolean
+
+    "Created: / 24-09-2015 / 16:39:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+output
+    ^ self optionAt: #output default: nil
+
+    "Created: / 24-09-2015 / 16:38:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+output: aSgtring
+    self optionAt: #output put: aSgtring.
+
+    "Created: / 24-09-2015 / 16:38:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TCompilerOptions class methodsFor:'documentation'!
+
+version
+    ^ 'Path: jv/tea/compiler/TCompilerOptions.st, Version: 1.0, User: jv, Time: 2015-09-25T03:26:11.669+01'
+!
+
+version_HG
+    ^ 'Path: jv/tea/compiler/TCompilerOptions.st, Version: 1.0, User: jv, Time: 2015-09-25T03:26:11.669+01'
+! !
+