compiler/TVariableBinding.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 25 Sep 2015 03:51:15 +0100
changeset 16 17a2d1d9f205
parent 13 97090c2baa33
permissions -rw-r--r--
Added standalone Tea compiler - teak It allows for compilation of .tea files from the command line.

"
    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 }"

TValueBinding subclass:#TVariableBinding
	instanceVariableNames:'name index'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler-Bindings'
!

!TVariableBinding 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.
"
! !

!TVariableBinding class methodsFor:'instance creation'!

name:aString 
    ^ self new initializeWithName:aString

    "Created: / 31-08-2015 / 12:08:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TVariableBinding class methodsFor:'queries'!

isAbstract
    "Return if this class is an abstract class.
     True is returned here for myself only; false for subclasses.
     Abstract subclasses must redefine again."

    ^ self == TVariableBinding.
! !

!TVariableBinding methodsFor:'accessing'!

name
    ^ name
! !

!TVariableBinding methodsFor:'conversion'!

asLLVMValueInModule: aLLVMModule
    self halt.

    "Created: / 02-09-2015 / 08:34:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 03-09-2015 / 07:05:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TVariableBinding methodsFor:'initialization'!

initializeWithName:aString 
    name := aString.

    "Created: / 31-08-2015 / 12:07:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TVariableBinding methodsFor:'printing & storing'!

printOn:aStream
    aStream nextPutAll: name.
    aStream space.
    type notNil ifTrue:[ 
        type printOn: aStream
    ] ifFalse:[ 
        aStream nextPutAll: '< ??? >'
    ].

    "Modified: / 25-08-2015 / 22:54:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TVariableBinding class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !