Cface__CDefinitionFileNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 06 Jul 2015 07:18:24 +0100
changeset 36 4e586238a9f7
parent 32 d7464405cbda
child 43 9327987437ae
permissions -rw-r--r--
Fix in class generator (MethofDefinitionChange>>classVariableNames: now takes collection, not string)

"{ Package: 'jv:cface' }"

"{ NameSpace: Cface }"

CDefinitionNode subclass:#CDefinitionFileNode
	instanceVariableNames:'source definitions'
	classVariableNames:''
	poolDictionaries:''
	category:'Cface-C AST'
!

!CDefinitionFileNode class methodsFor:'documentation'!

history

    "Created: / 25-10-2007 / 14:19:43 / haja"
    "Created: #generatedFrom:defBody: / 25-10-2007 / 14:23:00 / haja"
    "Deleted: #generatedFrom: / 25-10-2007 / 14:25:48 / haja"
    "Created: #generatedFrom / 25-10-2007 / 14:25:52 / haja"
    "Created: #generatedFrom: / 25-10-2007 / 14:25:52 / haja"
    "Created: #defBody / 25-10-2007 / 14:25:52 / haja"
    "Created: #defBody: / 25-10-2007 / 14:25:52 / haja"
    "Created: #acceptVisitor: / 02-11-2007 / 10:43:58 / haja"
! !

!CDefinitionFileNode methodsFor:'accessing'!

definitions
    ^ definitions

    "Created: / 10-02-2008 / 19:09:31 / janfrog"
!

definitions:aCollection
    definitions := aCollection asSortedCollection:
                                [:a :b|a priority > b priority]

    "Created: / 10-02-2008 / 19:09:31 / janfrog"
    "Modified: / 17-02-2008 / 18:01:01 / janfrog"
!

source
    ^ source

    "Created: / 10-02-2008 / 19:09:31 / janfrog"
!

source:something
    source := something.

    "Created: / 10-02-2008 / 19:09:31 / janfrog"
! !

!CDefinitionFileNode methodsFor:'printing'!

printOn: stream indent: level

    definitions do:
        [:definition|
        definition printOn: stream indent: level.
        stream cr; cr]

    "Created: / 17-02-2008 / 18:47:43 / janfrog"
! !

!CDefinitionFileNode methodsFor:'testing'!

isCDefinitionFileNode
    ^ true

    "Created: / 17-02-2008 / 21:49:53 / janfrog"
! !

!CDefinitionFileNode methodsFor:'visiting'!

acceptVisitor:aVisitor 
    "Double dispatch back to the visitor, passing my type encoded in
     the selector (visitor pattern)"
    "stub code automatically generated - please change if required"
    
    ^ aVisitor visitCDefinitionFileNode:self

    "Created: / 02-11-2007 / 10:43:58 / haja"
    "Modified: / 12-02-2008 / 22:58:57 / janfrog"
! !

!CDefinitionFileNode class methodsFor:'documentation'!

version
    ^ '$Id$'
!

version_SVN
    ^ '$Id$'
! !