TSimpleTypeNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 22 Aug 2015 00:17:35 +0100
changeset 0 db69a8d8b368
permissions -rw-r--r--
Initial shot: parser, type nodes, types and little bit of a support.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'jv:tea' }"
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: Smalltalk }"
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
TTypeNode subclass:#TSimpleTypeNode
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:'name start stop'
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	category:'Languages-Tea-AST'
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
!TSimpleTypeNode methodsFor:'accessing'!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
name
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
    ^ name
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
name:aString
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
    name := aString.
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
start
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
    ^ start
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
start:anInteger
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
    start := anInteger.
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
stop
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
    ^ stop
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
stop:anInteger
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
    stop := anInteger.
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
! !
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
!TSimpleTypeNode methodsFor:'visitor'!
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
acceptVisitor: aProgramNodeVisitor 
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
    ^ aProgramNodeVisitor acceptSimpleTypeNode: self
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
    "Created: / 21-08-2015 / 22:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
! !
db69a8d8b368 Initial shot: parser, type nodes, types and little bit of a support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45