mirror of
https://github.com/alecthomas/chroma.git
synced 2025-03-17 20:58:08 +02:00
Import JSX lexer from https://github.com/fcurella/jsx-lexer
Fixes #218.
This commit is contained in:
parent
2105c68ed2
commit
9618112850
108
lexers/j/jsx.go
108
lexers/j/jsx.go
File diff suppressed because one or more lines are too long
10
lexers/testdata/jsx.expected
vendored
10
lexers/testdata/jsx.expected
vendored
@ -1,5 +1,5 @@
|
|||||||
[
|
[
|
||||||
{"type":"Keyword","value":"import"},
|
{"type":"KeywordReserved","value":"import"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
{"type":"NameOther","value":"React"},
|
{"type":"NameOther","value":"React"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
@ -8,7 +8,7 @@
|
|||||||
{"type":"LiteralStringSingle","value":"'react'"},
|
{"type":"LiteralStringSingle","value":"'react'"},
|
||||||
{"type":"Punctuation","value":";"},
|
{"type":"Punctuation","value":";"},
|
||||||
{"type":"Text","value":"\n"},
|
{"type":"Text","value":"\n"},
|
||||||
{"type":"Keyword","value":"import"},
|
{"type":"KeywordReserved","value":"import"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
{"type":"NameOther","value":"ReactDOM"},
|
{"type":"NameOther","value":"ReactDOM"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
@ -17,7 +17,7 @@
|
|||||||
{"type":"LiteralStringSingle","value":"'react-dom'"},
|
{"type":"LiteralStringSingle","value":"'react-dom'"},
|
||||||
{"type":"Punctuation","value":";"},
|
{"type":"Punctuation","value":";"},
|
||||||
{"type":"Text","value":"\n"},
|
{"type":"Text","value":"\n"},
|
||||||
{"type":"Keyword","value":"import"},
|
{"type":"KeywordReserved","value":"import"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
{"type":"NameOther","value":"App"},
|
{"type":"NameOther","value":"App"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
@ -26,12 +26,12 @@
|
|||||||
{"type":"LiteralStringSingle","value":"'./component/App'"},
|
{"type":"LiteralStringSingle","value":"'./component/App'"},
|
||||||
{"type":"Punctuation","value":";"},
|
{"type":"Punctuation","value":";"},
|
||||||
{"type":"Text","value":"\n"},
|
{"type":"Text","value":"\n"},
|
||||||
{"type":"Keyword","value":"import"},
|
{"type":"KeywordReserved","value":"import"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
{"type":"LiteralStringSingle","value":"'./index.css'"},
|
{"type":"LiteralStringSingle","value":"'./index.css'"},
|
||||||
{"type":"Punctuation","value":";"},
|
{"type":"Punctuation","value":";"},
|
||||||
{"type":"Text","value":"\n"},
|
{"type":"Text","value":"\n"},
|
||||||
{"type":"Keyword","value":"import"},
|
{"type":"KeywordReserved","value":"import"},
|
||||||
{"type":"Text","value":" "},
|
{"type":"Text","value":" "},
|
||||||
{"type":"LiteralStringSingle","value":"'github-fork-ribbon-css/gh-fork-ribbon.css'"},
|
{"type":"LiteralStringSingle","value":"'github-fork-ribbon-css/gh-fork-ribbon.css'"},
|
||||||
{"type":"Punctuation","value":";"},
|
{"type":"Punctuation","value":";"},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user