compiler/TSimpleTypeNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 25 Sep 2015 03:51:15 +0100
changeset 16 17a2d1d9f205
parent 3 97ee341d3e9f
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 }"

TTypeNode subclass:#TSimpleTypeNode
	instanceVariableNames:'name start stop'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler-AST'
!

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

!TSimpleTypeNode methodsFor:'accessing'!

name
    ^ name
!

name:aString
    name := aString.
!

start
    ^ start
!

start:anInteger
    start := anInteger.
!

stop
    ^ stop
!

stop:anInteger
    stop := anInteger.
! !

!TSimpleTypeNode methodsFor:'conversion'!

asType
    "superclass TTypeNode says that I am responsible to implement this method"

    ^ TSimpleType named: name

    "Modified: / 25-08-2015 / 23:04:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TSimpleTypeNode methodsFor:'visitor'!

acceptVisitor: aProgramNodeVisitor 
    ^ aProgramNodeVisitor acceptSimpleTypeNode: self

    "Created: / 21-08-2015 / 22:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !