SelectorNode.st
author Claus Gittinger <cg@exept.de>
Tue, 25 Feb 2020 13:40:53 +0100
changeset 4644 117a8f63f3f8
parent 4325 2922fc281577
child 4723 524785227024
permissions -rw-r--r--
#BUGFIX by cg class: Parser changed: #stringWithEmbeddedExpressions

"{ Encoding: utf8 }"

"{ Package: 'stx:libcomp' }"

"{ NameSpace: Smalltalk }"

ParseNode subclass:#SelectorNode
	instanceVariableNames:'value'
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-CodeView-Syntax'
!

!SelectorNode class methodsFor:'documentation'!

documentation
"
    A (helper) node that represents a selector (or its part).
    SelectorNodes are not directly created nor used by the
    parser/compiler itself.

    Some custom subclasses (syntax highlighters for instance)
    makes use of it.

    [author:]
        Jan Vrany <jan.vrany@fit.cvut.cz>

    [instance variables:]

    [class variables:]

    [see also:]
        SyntaxHighlighter2

"
! !

!SelectorNode class methodsFor:'instance creation'!

value: selector from: start to: end

    ^self new
        value: selector;
        startPosition:start endPosition: end

    "Created: / 16-02-2012 / 20:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!SelectorNode methodsFor:'accessing'!

name
    "req'd because ParseTreeIndex::Element sends it"

    ^ value
!

selector
    ^ value

    "Created: / 25-02-2014 / 22:08:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

value
    ^ value
!

value:aString
    value := aString.
! !

!SelectorNode methodsFor:'testing'!

isSelector
    ^ true

    "Created: / 16-02-2012 / 21:04:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified (format): / 22-01-2019 / 16:13:10 / Stefan Vogel"
! !

!SelectorNode class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !