Menu

Diff of /trunk/python/python-tokenizer.php [r26] .. [r27]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/python/python-tokenizer.php
+++ b/trunk/python/python-tokenizer.php
@@ -50,6 +50,14 @@
 		} else if (re('/^=/',$c,$r)) {
 			# round branch open
 			$tokens[] = token("EQUAL");
+					
+		} else if (re('/^\+/',$c,$r)) {
+			# round branch open
+			$tokens[] = token("PLUS");
+
+		} else if (re('/^==/',$c,$r)) {
+			# round branch open
+			$tokens[] = token("EQUAL");
 
 		} else if (re('/^\(/',$c,$r)) {
 			# round branch open
@@ -78,6 +86,10 @@
 		} else if (re('/^print/',$c,$r)) {
 			# print token
 			$tokens[] = token("PRINT");
+					
+		} else if (re('/^while/',$c,$r)) {
+			# while token
+			$tokens[] = token("WHILE");
 
 		} else if (re('/^True/',$c,$r)) {
 			# round branch close
@@ -108,7 +120,7 @@
 			if (@in_array($r[0],$python_tokens)) {
 				$tokens[] = token(strtoupper($r[0]));
 			} else {
-				$tokens[] = token("LNAME",$r[0]);
+				$tokens[] = token("NAME",$r[0]);
 			}
 			
 		} else {
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.