SmallSense__TokenNode.st
changeset 200 12d6a2f82d95
parent 199 c2d7421cb317
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SmallSense__TokenNode.st	Tue May 06 17:29:29 2014 +0100
@@ -0,0 +1,49 @@
+"{ Package: 'jv:smallsense' }"
+
+"{ NameSpace: SmallSense }"
+
+Regex::RxsNode subclass:#TokenNode
+	instanceVariableNames:'type value'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SmallSense-Utils-Matcher'
+!
+
+!TokenNode methodsFor:'accessing'!
+
+type
+    ^ type
+!
+
+type:something
+    type := something.
+!
+
+value
+    ^ value
+!
+
+value:something
+    value := something.
+! !
+
+!TokenNode 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>"
+! !
+
+!TokenNode methodsFor:'initialization'!
+
+initializeTyoe: t value: v
+    type := t.
+    value := v
+
+    "Created: / 02-05-2014 / 21:21:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+