Menu

Diff of /trunk/python/python-tokenizer.php [r15] .. [r16]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/python/python-tokenizer.php
+++ b/trunk/python/python-tokenizer.php
@@ -148,6 +148,10 @@
 			# colon
 			$tokens[] = token("COLON");
 
+		} else if (preg_match('/^=/', $pycode, $regs)) {
+			# round branch open
+			$tokens[] = token("EQUAL");
+
 		} else if (preg_match('/^\(/', $pycode, $regs)) {
 			# round branch open
 			$tokens[] = token("RBO");
@@ -155,7 +159,39 @@
 		} else if (preg_match('/^\)/', $pycode, $regs)) {
 			# round branch close
 			$tokens[] = token("RBC");
+
+		} else if (preg_match('/^\[/', $pycode, $regs)) {
+			# round branch open
+			$tokens[] = token("SBO");
+
+		} else if (preg_match('/^\]/', $pycode, $regs)) {
+			# round branch close
+			$tokens[] = token("SBC");
 		
+		} else if (preg_match('/^{/', $pycode, $regs)) {
+			# round branch open
+			$tokens[] = token("BO");
+
+		} else if (preg_match('/^}/', $pycode, $regs)) {
+			# round branch close
+			$tokens[] = token("BC");
+
+		} else if (preg_match('/^True/', $pycode, $regs)) {
+			# round branch close
+			$tokens[] = token("TRUE");
+
+		} else if (preg_match('/^False/', $pycode, $regs)) {
+			# round branch close
+			$tokens[] = token("FALSE");
+
+		} else if (preg_match('/^None/', $pycode, $regs)) {
+			# round branch close
+			$tokens[] = token("NONE");
+
+		} else if (preg_match('/^\.\.\./', $pycode, $regs)) {
+			# round branch close
+			$tokens[] = token("TRIEPLEDOT");
+
 		} else if (preg_match('/^[0-9]+(\.[0-9]*)?/', $pycode, $regs)) {
 			# number
 			$tokens[] = token("NUMBER",$regs[0]);
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.