Browse Source

Remove debug output from XML.cake

master
Macoy Madson 8 months ago
parent
commit
e2b29dd89b
  1. 7
      src/XML.cake

7
src/XML.cake

@ -25,7 +25,6 @@
(var recognized-tags (* (<> (in std vector) (* (const char))))
(addr (at (deref format) (deref xml-formats))))
(each-in-range (call-on-ptr size recognized-tags) i
(fprintf stderr "compare %s and %s\n" (at i (deref recognized-tags)) (call-on c_str (path token > contents)))
(when (= 0 (strcmp (at i (deref recognized-tags)) (call-on c_str (path token > contents))))
(return true)))
(return false))
@ -53,8 +52,6 @@
(each-in-interval body end-body-index current-token-index
(var current-token (* (const Token)) (addr (at current-token-index tokens)))
(var is-cakelisp-token bool true)
(printFormattedToken stderr (deref current-token))
(fprintf stderr " (token)\n")
(cond
((= (path current-token > type) TokenType_OpenParen)
(when tag-attribute-mode
@ -103,8 +100,6 @@
(var exit-tag (* tag) (addr (call-on back xml-open-tag-stack)))
(when (path exit-tag > is-xml-tag)
(var exit-tag-name (* (const Token)) (+ 1 (path exit-tag > tag-open)))
(Logf "Exit %s\n"
(call-on c_str (path exit-tag-name > contents)))
(var tag-string Token (deref (+ 1 current-token)))
(set (field tag-string type) TokenType_String)
(cond
@ -125,7 +120,6 @@
((and (= (path current-token > type) TokenType_Symbol)
(> (call-on size (path current-token > contents)) 1)
(= ':' (at 0 (path current-token > contents))))
(Logf "Attribute %s\n" (call-on c_str (path current-token > contents)))
(var attribute-string Token (deref current-token))
(set (field attribute-string type) TokenType_String)
(token-contents-snprintf attribute-string " %s="
@ -151,7 +145,6 @@
(when is-cakelisp-token
(call-on push_back stripped-output (deref current-token))))
(prettyPrintTokens stripped-output)
(tokenize-push output
(token-splice-array stripped-output))
(return true))

Loading…
Cancel
Save