parse
parse copied to clipboard
Go parsers for web formats
I’m thrilled to see a repository with tokenization for HTML, CSS, and JS. I may have found a couple issues. Since the [2013 edition of the CSS Syntax specification](https://www.w3.org/TR/2013/WD-css-syntax-3-20130919/#consume-a-list-of-declarations), the...
For example: ``` Stmt(if (((((document.location).href).indexOf)("default="))>=0) Stmt({ Decl(var Binding(lang = ((((document.location).href).substring)((((((document.location).href).indexOf)("default="))+8))))) Stmt((document.write)((((("")+(decodeURI(lang)))+""))) Stmt((document.write)("----")) })) Stmt((document.write)("English")) Stmt((document.write)("French")) Stmt((document.write)("Spanish")) Stmt((document.write)("German")) ``` to "Stmt":{ "xxx":"xxxx" ......... }
I am looking for something to get attribute values without quotes. Currently I am using this: ~~~go package parse import ( "bytes" "html" ) func getAttr(b []byte) []byte { b...
please provide an example so I could PR to add into readme. discovered ```go func pareJSFile(path string) { jsStr, err := ioutil.ReadFile(path) if err != nil { fmt.Println(err) return }...
Hello there, I've noticed some interesting behavior with the CSS parser. It doesn't seem to return comment grammar for comments in rulesets. It works fine for comments defined outside of...
Parsing JS with some script that in some point we have \uFFFD. The "Next()" function return with the next error: unexpected � on line 135 and column 5 135: �});...