SmallSense__TokenPatternToken.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 09 May 2014 17:16:42 +0100
changeset 203 c70b7351eda6
parent 202 SmallSense__TokenPatternNode.st@5c8610dad14c
child 249 8bc64027b189
permissions -rw-r--r--
Changed TokenPatternParser to parse from string rather from literal array. The literal array syntax was ambiguous and no way easier to read.

"{ Package: 'jv:smallsense' }"

"{ NameSpace: SmallSense }"

Regex::RxsNode subclass:#TokenPatternToken
	instanceVariableNames:'type value'
	classVariableNames:''
	poolDictionaries:''
	category:'SmallSense-Utils-Matcher'
!

!TokenPatternToken methodsFor:'accessing'!

type
    ^ type
!

type:something
    type := something.
!

value
    ^ value
!

value:something
    value := something.
! !

!TokenPatternToken methodsFor:'double dispatch'!

dispatchTo: matcher
     "Inform the matcher of the kind of the node, and it
      will do whatever it has to."

     ^matcher syntaxToken: self

    "Created: / 06-05-2014 / 14:32:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TokenPatternToken methodsFor:'initialization'!

initializeTyoe: t value: v
    type := t.
    value := v

    "Created: / 02-05-2014 / 21:21:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TokenPatternToken methodsFor:'testing'!

isEnumerable
    ^ false

    "Created: / 09-05-2014 / 16:10:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !