Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <language id="go" _name="Go" version="2.0" _section="Sources">
- <metadata>
- <property name="mimetypes">text</property>
- <property name="globs">*.go</property>
- <property name="line-comment-start">//</property>
- <property name="block-comment-start">/*</property>
- <property name="block-comment-end">*/</property>
- </metadata>
- <styles>
- <style id="comment" _name="Comment" map-to="def:comment"/>
- <style id="error" _name="Error" map-to="def:error"/>
- <style id="string" _name="String" map-to="def:string"/>
- <style id="keyword" _name="Keyword" map-to="def:keyword"/>
- <style id="type" _name="Data Type" map-to="def:type"/>
- <style id="special-token" _name="Special Token" map-to="def:preprocessor"/>
- <style id="null-value" _name="Null Value" map-to="def:special-constant"/>
- <style id="boolean" _name="Boolean" map-to="def:boolean"/>
- <style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
- <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
- <style id="binary" _name="Binary number" map-to="def:base-n-integer"/>
- <style id="octal" _name="Octal number" map-to="def:base-n-integer"/>
- <style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
- </styles>
- <definitions>
- <context id="line-comment" style-ref="comment" end-at-line-end="true">
- <start>//</start>
- <include>
- <context ref="def:in-line-comment"/>
- </include>
- </context>
- <context id="block-comment" style-ref="comment">
- <start>/\*</start>
- <end>\*/</end>
- <include>
- <context ref="def:in-comment"/>
- </include>
- </context>
- <context id="close-comment-outside-comment" style-ref="error">
- <match>\*/(?!\*)</match>
- </context>
- <context id="double-quoted-string" style-ref="string">
- <start>"</start>
- <end>"</end>
- <include>
- <context ref="def:escape"/>
- <context ref="def:line-continue"/>
- </include>
- </context>
- <context id="single-quoted-string" style-ref="string" end-at-line-end="true">
- <start>'</start>
- <end>'</end>
- <include>
- <context ref="def:escape"/>
- <context ref="def:line-continue"/>
- </include>
- </context>
- <context id="backtick-quoted-string" style-ref="string">
- <start>`</start>
- <end>`</end>
- <include>
- <context ref="def:escape"/>
- <context ref="def:line-continue"/>
- </include>
- </context>
- <context id="keywords" style-ref="keyword">
- <keyword>break</keyword>
- <keyword>case</keyword>
- <keyword>chan</keyword>
- <keyword>const</keyword>
- <keyword>continue</keyword>
- <keyword>default</keyword>
- <keyword>defer</keyword>
- <keyword>else</keyword>
- <keyword>fallthrough</keyword>
- <keyword>for</keyword>
- <keyword>func</keyword>
- <keyword>go</keyword>
- <keyword>goto</keyword>
- <keyword>if</keyword>
- <keyword>import</keyword>
- <keyword>interface</keyword>
- <keyword>map</keyword>
- <keyword>package</keyword>
- <keyword>range</keyword>
- <keyword>return</keyword>
- <keyword>select</keyword>
- <keyword>struct</keyword>
- <keyword>switch</keyword>
- <keyword>type</keyword>
- <keyword>var</keyword>
- </context>
- <context id="types" style-ref="type">
- <keyword>bool</keyword>
- <keyword>uint8</keyword>
- <keyword>uint16</keyword>
- <keyword>uint32</keyword>
- <keyword>uint64</keyword>
- <keyword>int8</keyword>
- <keyword>int16</keyword>
- <keyword>int32</keyword>
- <keyword>int64</keyword>
- <keyword>float32</keyword>
- <keyword>float64</keyword>
- <keyword>byte</keyword>
- <keyword>uint</keyword>
- <keyword>int</keyword>
- <keyword>float</keyword>
- <keyword>uintptr</keyword>
- <keyword>string</keyword>
- <keyword>bool</keyword>
- </context>
- <context id="null-value" style-ref="null-value">
- <keyword>nil</keyword>
- </context>
- <context id="boolean" style-ref="boolean">
- <keyword>false</keyword>
- <keyword>true</keyword>
- </context>
- <context id="float" style-ref="floating-point">
- <match extended="true">
- (?<![\w\.])
- ([0-9_]+[Ee][-]?[0-9_]+|([0-9_]*\.[0-9_]+|[0-9_]+\.)([Ee][-]?[0-9_]+)?)[fFLi]?
- (?![\w\.])
- </match>
- </context>
- <context id="decimal" style-ref="decimal">
- <match extended="true">
- (?<![\w\.])
- ([1-9][0-9_]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
- (?![\w\.])
- </match>
- </context>
- <context id="binary" style-ref="binary">
- <match extended="true">
- (?<![\w\.])
- 0[bB][01_]*
- (?![\w\.])
- </match>
- </context>
- <context id="octal" style-ref="octal">
- <match extended="true">
- (?<![\w\.])
- 0[0-7_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
- (?![\w\.])
- </match>
- </context>
- <context id="hexadecimal" style-ref="hexadecimal">
- <match extended="true">
- (?<![\w\.])
- 0[xX][0-9a-fA-F_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
- (?![\w\.])
- </match>
- </context>
- <context id="go">
- <include>
- <context ref="def:shebang"/>
- <context ref="line-comment"/>
- <context ref="block-comment"/>
- <context ref="close-comment-outside-comment"/>
- <context ref="double-quoted-string"/>
- <context ref="single-quoted-string"/>
- <context ref="backtick-quoted-string"/>
- <context ref="keywords"/>
- <context ref="types"/>
- <context ref="null-value"/>
- <context ref="boolean"/>
- <context ref="float"/>
- <context ref="binary"/>
- <context ref="octal"/>
- <context ref="decimal"/>
- <context ref="hexadecimal"/>
- </include>
- </context>
- </definitions>
- </language>
Add Comment
Please, Sign In to add comment