packages feed

highlighting-kate 0.6.1 → 0.6.2

raw patch · 9 files changed

+889/−119 lines, 9 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ParseSyntaxFiles.hs view
@@ -333,6 +333,14 @@             "RegExpr"          -> if parserDynamic parser                                      then "pRegExprDynamic " ++ show (parserString parser)                                      else "pRegExpr " ++ compiledRegexName (parserString parser)+            "WordDetect"      -> if parserDynamic parser+                                     then "pRegExprDynamic " ++ wordRe+                                     else "pRegExpr (compileRegex " ++ show caseSensitive ++ " " ++ show wordRe ++ ")"+                                  where wordRe = "\\b" ++ concatMap esc (parserString parser) ++ "\\b"+                                        esc c = if c `elem` "[]{}^$\\-*.+?"+                                                   then ['\\',c]+                                                   else [c]+                                        caseSensitive = synCaseSensitive syntax             "keyword"          -> "pKeyword " ++ show (keywordDelims $ synKeywordAttr syntax) ++ " " ++ list                                      where list = case lookup string (synLists syntax) of                                                    Just _   -> listName string
README.md view
@@ -7,119 +7,19 @@ It can produce both HTML and LaTeX output.  Currently, the following languages/formats are supported:-- Abc-- Actionscript-- Ada-- Agda-- Apache-- Asn1-- Asp-- Awk-- Bash-- Bibtex-- Boo-- C-- Changelog-- Clojure-- Cmake-- Coffeescript-- Coldfusion-- Commonlisp-- Cpp-- Cs-- Css-- Curry-- D-- Diff-- Djangotemplate-- Dockerfile-- Dot-- Doxygen-- Dtd-- Eiffel-- Email-- Erlang-- Fasm-- Fortran-- Fsharp-- Gcc-- Glsl-- Gnuassembler-- Go-- Haskell-- Haxe-- Html-- Idris-- Ini-- Isocpp-- Java-- Javadoc-- Javascript-- Json-- Jsp-- Julia-- Latex-- Lex-- Lilypond-- LiterateCurry-- LiterateHaskell-- Lua-- M4-- Makefile-- Mandoc-- Markdown-- Mathematica-- Matlab-- Maxima-- Mediawiki-- Metafont-- Mips-- Modula2-- Modula3-- Monobasic-- Nasm-- Noweb-- Objectivec-- Objectivecpp-- Ocaml-- Octave-- Opencl-- Pascal-- Perl-- Php-- Pike-- Postscript-- Prolog-- Pure-- Python-- R-- Relaxng-- Relaxngcompact-- Rest-- Rhtml-- Roff-- Ruby-- Rust-- Scala-- Scheme-- Sci-- Sed-- Sgml-- Sql-- SqlMysql-- SqlPostgresql-- Tcl-- Tcsh-- Texinfo-- Verilog-- Vhdl-- Xml-- Xorg-- Xslt-- Xul-- Yacc-- Yaml-- Zsh+Abc Actionscript Ada Agda Alert Alert_indent Apache Asn1 Asp Awk+Bash Bibtex Boo C Changelog Clojure Cmake Coffee Coldfusion+Commonlisp Cpp Cs Css Curry D Diff Djangotemplate Dockerfile Dot+Doxygen Doxygenlua Dtd Eiffel Elixir Email Erlang Fasm Fortran+Fsharp Gcc Glsl Gnuassembler Go Hamlet Haskell Haxe Html Idris+Ini Isocpp Java Javadoc Javascript Json Jsp Julia Kotlin Latex+Lex Lilypond LiterateCurry LiterateHaskell Llvm Lua M4 Makefile+Mandoc Markdown Mathematica Matlab Maxima Mediawiki Metafont+Mips Modelines Modula2 Modula3 Monobasic Nasm Noweb Objectivec+Objectivecpp Ocaml Octave Opencl Pascal Perl Php Pike Postscript+Prolog Pure Python R Relaxng Relaxngcompact Rest Rhtml Roff Ruby+Rust Scala Scheme Sci Sed Sgml Sql SqlMysql SqlPostgresql Tcl+Tcsh Texinfo Verilog Vhdl Xml Xorg Xslt Xul Yacc Yaml Zsh  To install, use the cabal tool: 
Text/Highlighting/Kate/Syntax.hs view
@@ -51,6 +51,7 @@ import qualified Text.Highlighting.Kate.Syntax.Doxygenlua as Doxygenlua import qualified Text.Highlighting.Kate.Syntax.Dtd as Dtd import qualified Text.Highlighting.Kate.Syntax.Eiffel as Eiffel+import qualified Text.Highlighting.Kate.Syntax.Elixir as Elixir import qualified Text.Highlighting.Kate.Syntax.Email as Email import qualified Text.Highlighting.Kate.Syntax.Erlang as Erlang import qualified Text.Highlighting.Kate.Syntax.Fasm as Fasm@@ -60,6 +61,7 @@ import qualified Text.Highlighting.Kate.Syntax.Glsl as Glsl import qualified Text.Highlighting.Kate.Syntax.Gnuassembler as Gnuassembler import qualified Text.Highlighting.Kate.Syntax.Go as Go+import qualified Text.Highlighting.Kate.Syntax.Hamlet as Hamlet import qualified Text.Highlighting.Kate.Syntax.Haskell as Haskell import qualified Text.Highlighting.Kate.Syntax.Haxe as Haxe import qualified Text.Highlighting.Kate.Syntax.Html as Html@@ -140,15 +142,15 @@  -- | List of supported languages. languages :: [String]-languages = ["Abc","Actionscript","Ada","Agda","Alert","Alert_indent","Apache","Asn1","Asp","Awk","Bash","Bibtex","Boo","C","Changelog","Clojure","Cmake","Coffee","Coldfusion","Commonlisp","Cpp","Cs","Css","Curry","D","Diff","Djangotemplate","Dockerfile","Dot","Doxygen","Doxygenlua","Dtd","Eiffel","Email","Erlang","Fasm","Fortran","Fsharp","Gcc","Glsl","Gnuassembler","Go","Haskell","Haxe","Html","Idris","Ini","Isocpp","Java","Javadoc","Javascript","Json","Jsp","Julia","Kotlin","Latex","Lex","Lilypond","LiterateCurry","LiterateHaskell","Llvm","Lua","M4","Makefile","Mandoc","Markdown","Mathematica","Matlab","Maxima","Mediawiki","Metafont","Mips","Modelines","Modula2","Modula3","Monobasic","Nasm","Noweb","Objectivec","Objectivecpp","Ocaml","Octave","Opencl","Pascal","Perl","Php","Pike","Postscript","Prolog","Pure","Python","R","Relaxng","Relaxngcompact","Rest","Rhtml","Roff","Ruby","Rust","Scala","Scheme","Sci","Sed","Sgml","Sql","SqlMysql","SqlPostgresql","Tcl","Tcsh","Texinfo","Verilog","Vhdl","Xml","Xorg","Xslt","Xul","Yacc","Yaml","Zsh"]+languages = ["Abc","Actionscript","Ada","Agda","Alert","Alert_indent","Apache","Asn1","Asp","Awk","Bash","Bibtex","Boo","C","Changelog","Clojure","Cmake","Coffee","Coldfusion","Commonlisp","Cpp","Cs","Css","Curry","D","Diff","Djangotemplate","Dockerfile","Dot","Doxygen","Doxygenlua","Dtd","Eiffel","Elixir","Email","Erlang","Fasm","Fortran","Fsharp","Gcc","Glsl","Gnuassembler","Go","Hamlet","Haskell","Haxe","Html","Idris","Ini","Isocpp","Java","Javadoc","Javascript","Json","Jsp","Julia","Kotlin","Latex","Lex","Lilypond","LiterateCurry","LiterateHaskell","Llvm","Lua","M4","Makefile","Mandoc","Markdown","Mathematica","Matlab","Maxima","Mediawiki","Metafont","Mips","Modelines","Modula2","Modula3","Monobasic","Nasm","Noweb","Objectivec","Objectivecpp","Ocaml","Octave","Opencl","Pascal","Perl","Php","Pike","Postscript","Prolog","Pure","Python","R","Relaxng","Relaxngcompact","Rest","Rhtml","Roff","Ruby","Rust","Scala","Scheme","Sci","Sed","Sgml","Sql","SqlMysql","SqlPostgresql","Tcl","Tcsh","Texinfo","Verilog","Vhdl","Xml","Xorg","Xslt","Xul","Yacc","Yaml","Zsh"]  -- | List of language extensions. languageExtensions :: [(String, String)]-languageExtensions = [("Abc", Abc.syntaxExtensions), ("Actionscript", Actionscript.syntaxExtensions), ("Ada", Ada.syntaxExtensions), ("Agda", Agda.syntaxExtensions), ("Alert", Alert.syntaxExtensions), ("Alert_indent", Alert_indent.syntaxExtensions), ("Apache", Apache.syntaxExtensions), ("Asn1", Asn1.syntaxExtensions), ("Asp", Asp.syntaxExtensions), ("Awk", Awk.syntaxExtensions), ("Bash", Bash.syntaxExtensions), ("Bibtex", Bibtex.syntaxExtensions), ("Boo", Boo.syntaxExtensions), ("C", C.syntaxExtensions), ("Changelog", Changelog.syntaxExtensions), ("Clojure", Clojure.syntaxExtensions), ("Cmake", Cmake.syntaxExtensions), ("Coffee", Coffee.syntaxExtensions), ("Coldfusion", Coldfusion.syntaxExtensions), ("Commonlisp", Commonlisp.syntaxExtensions), ("Cpp", Cpp.syntaxExtensions), ("Cs", Cs.syntaxExtensions), ("Css", Css.syntaxExtensions), ("Curry", Curry.syntaxExtensions), ("D", D.syntaxExtensions), ("Diff", Diff.syntaxExtensions), ("Djangotemplate", Djangotemplate.syntaxExtensions), ("Dockerfile", Dockerfile.syntaxExtensions), ("Dot", Dot.syntaxExtensions), ("Doxygen", Doxygen.syntaxExtensions), ("Doxygenlua", Doxygenlua.syntaxExtensions), ("Dtd", Dtd.syntaxExtensions), ("Eiffel", Eiffel.syntaxExtensions), ("Email", Email.syntaxExtensions), ("Erlang", Erlang.syntaxExtensions), ("Fasm", Fasm.syntaxExtensions), ("Fortran", Fortran.syntaxExtensions), ("Fsharp", Fsharp.syntaxExtensions), ("Gcc", Gcc.syntaxExtensions), ("Glsl", Glsl.syntaxExtensions), ("Gnuassembler", Gnuassembler.syntaxExtensions), ("Go", Go.syntaxExtensions), ("Haskell", Haskell.syntaxExtensions), ("Haxe", Haxe.syntaxExtensions), ("Html", Html.syntaxExtensions), ("Idris", Idris.syntaxExtensions), ("Ini", Ini.syntaxExtensions), ("Isocpp", Isocpp.syntaxExtensions), ("Java", Java.syntaxExtensions), ("Javadoc", Javadoc.syntaxExtensions), ("Javascript", Javascript.syntaxExtensions), ("Json", Json.syntaxExtensions), ("Jsp", Jsp.syntaxExtensions), ("Julia", Julia.syntaxExtensions), ("Kotlin", Kotlin.syntaxExtensions), ("Latex", Latex.syntaxExtensions), ("Lex", Lex.syntaxExtensions), ("Lilypond", Lilypond.syntaxExtensions), ("LiterateCurry", LiterateCurry.syntaxExtensions), ("LiterateHaskell", LiterateHaskell.syntaxExtensions), ("Llvm", Llvm.syntaxExtensions), ("Lua", Lua.syntaxExtensions), ("M4", M4.syntaxExtensions), ("Makefile", Makefile.syntaxExtensions), ("Mandoc", Mandoc.syntaxExtensions), ("Markdown", Markdown.syntaxExtensions), ("Mathematica", Mathematica.syntaxExtensions), ("Matlab", Matlab.syntaxExtensions), ("Maxima", Maxima.syntaxExtensions), ("Mediawiki", Mediawiki.syntaxExtensions), ("Metafont", Metafont.syntaxExtensions), ("Mips", Mips.syntaxExtensions), ("Modelines", Modelines.syntaxExtensions), ("Modula2", Modula2.syntaxExtensions), ("Modula3", Modula3.syntaxExtensions), ("Monobasic", Monobasic.syntaxExtensions), ("Nasm", Nasm.syntaxExtensions), ("Noweb", Noweb.syntaxExtensions), ("Objectivec", Objectivec.syntaxExtensions), ("Objectivecpp", Objectivecpp.syntaxExtensions), ("Ocaml", Ocaml.syntaxExtensions), ("Octave", Octave.syntaxExtensions), ("Opencl", Opencl.syntaxExtensions), ("Pascal", Pascal.syntaxExtensions), ("Perl", Perl.syntaxExtensions), ("Php", Php.syntaxExtensions), ("Pike", Pike.syntaxExtensions), ("Postscript", Postscript.syntaxExtensions), ("Prolog", Prolog.syntaxExtensions), ("Pure", Pure.syntaxExtensions), ("Python", Python.syntaxExtensions), ("R", R.syntaxExtensions), ("Relaxng", Relaxng.syntaxExtensions), ("Relaxngcompact", Relaxngcompact.syntaxExtensions), ("Rest", Rest.syntaxExtensions), ("Rhtml", Rhtml.syntaxExtensions), ("Roff", Roff.syntaxExtensions), ("Ruby", Ruby.syntaxExtensions), ("Rust", Rust.syntaxExtensions), ("Scala", Scala.syntaxExtensions), ("Scheme", Scheme.syntaxExtensions), ("Sci", Sci.syntaxExtensions), ("Sed", Sed.syntaxExtensions), ("Sgml", Sgml.syntaxExtensions), ("Sql", Sql.syntaxExtensions), ("SqlMysql", SqlMysql.syntaxExtensions), ("SqlPostgresql", SqlPostgresql.syntaxExtensions), ("Tcl", Tcl.syntaxExtensions), ("Tcsh", Tcsh.syntaxExtensions), ("Texinfo", Texinfo.syntaxExtensions), ("Verilog", Verilog.syntaxExtensions), ("Vhdl", Vhdl.syntaxExtensions), ("Xml", Xml.syntaxExtensions), ("Xorg", Xorg.syntaxExtensions), ("Xslt", Xslt.syntaxExtensions), ("Xul", Xul.syntaxExtensions), ("Yacc", Yacc.syntaxExtensions), ("Yaml", Yaml.syntaxExtensions), ("Zsh", Zsh.syntaxExtensions)]+languageExtensions = [("Abc", Abc.syntaxExtensions), ("Actionscript", Actionscript.syntaxExtensions), ("Ada", Ada.syntaxExtensions), ("Agda", Agda.syntaxExtensions), ("Alert", Alert.syntaxExtensions), ("Alert_indent", Alert_indent.syntaxExtensions), ("Apache", Apache.syntaxExtensions), ("Asn1", Asn1.syntaxExtensions), ("Asp", Asp.syntaxExtensions), ("Awk", Awk.syntaxExtensions), ("Bash", Bash.syntaxExtensions), ("Bibtex", Bibtex.syntaxExtensions), ("Boo", Boo.syntaxExtensions), ("C", C.syntaxExtensions), ("Changelog", Changelog.syntaxExtensions), ("Clojure", Clojure.syntaxExtensions), ("Cmake", Cmake.syntaxExtensions), ("Coffee", Coffee.syntaxExtensions), ("Coldfusion", Coldfusion.syntaxExtensions), ("Commonlisp", Commonlisp.syntaxExtensions), ("Cpp", Cpp.syntaxExtensions), ("Cs", Cs.syntaxExtensions), ("Css", Css.syntaxExtensions), ("Curry", Curry.syntaxExtensions), ("D", D.syntaxExtensions), ("Diff", Diff.syntaxExtensions), ("Djangotemplate", Djangotemplate.syntaxExtensions), ("Dockerfile", Dockerfile.syntaxExtensions), ("Dot", Dot.syntaxExtensions), ("Doxygen", Doxygen.syntaxExtensions), ("Doxygenlua", Doxygenlua.syntaxExtensions), ("Dtd", Dtd.syntaxExtensions), ("Eiffel", Eiffel.syntaxExtensions), ("Elixir", Elixir.syntaxExtensions), ("Email", Email.syntaxExtensions), ("Erlang", Erlang.syntaxExtensions), ("Fasm", Fasm.syntaxExtensions), ("Fortran", Fortran.syntaxExtensions), ("Fsharp", Fsharp.syntaxExtensions), ("Gcc", Gcc.syntaxExtensions), ("Glsl", Glsl.syntaxExtensions), ("Gnuassembler", Gnuassembler.syntaxExtensions), ("Go", Go.syntaxExtensions), ("Hamlet", Hamlet.syntaxExtensions), ("Haskell", Haskell.syntaxExtensions), ("Haxe", Haxe.syntaxExtensions), ("Html", Html.syntaxExtensions), ("Idris", Idris.syntaxExtensions), ("Ini", Ini.syntaxExtensions), ("Isocpp", Isocpp.syntaxExtensions), ("Java", Java.syntaxExtensions), ("Javadoc", Javadoc.syntaxExtensions), ("Javascript", Javascript.syntaxExtensions), ("Json", Json.syntaxExtensions), ("Jsp", Jsp.syntaxExtensions), ("Julia", Julia.syntaxExtensions), ("Kotlin", Kotlin.syntaxExtensions), ("Latex", Latex.syntaxExtensions), ("Lex", Lex.syntaxExtensions), ("Lilypond", Lilypond.syntaxExtensions), ("LiterateCurry", LiterateCurry.syntaxExtensions), ("LiterateHaskell", LiterateHaskell.syntaxExtensions), ("Llvm", Llvm.syntaxExtensions), ("Lua", Lua.syntaxExtensions), ("M4", M4.syntaxExtensions), ("Makefile", Makefile.syntaxExtensions), ("Mandoc", Mandoc.syntaxExtensions), ("Markdown", Markdown.syntaxExtensions), ("Mathematica", Mathematica.syntaxExtensions), ("Matlab", Matlab.syntaxExtensions), ("Maxima", Maxima.syntaxExtensions), ("Mediawiki", Mediawiki.syntaxExtensions), ("Metafont", Metafont.syntaxExtensions), ("Mips", Mips.syntaxExtensions), ("Modelines", Modelines.syntaxExtensions), ("Modula2", Modula2.syntaxExtensions), ("Modula3", Modula3.syntaxExtensions), ("Monobasic", Monobasic.syntaxExtensions), ("Nasm", Nasm.syntaxExtensions), ("Noweb", Noweb.syntaxExtensions), ("Objectivec", Objectivec.syntaxExtensions), ("Objectivecpp", Objectivecpp.syntaxExtensions), ("Ocaml", Ocaml.syntaxExtensions), ("Octave", Octave.syntaxExtensions), ("Opencl", Opencl.syntaxExtensions), ("Pascal", Pascal.syntaxExtensions), ("Perl", Perl.syntaxExtensions), ("Php", Php.syntaxExtensions), ("Pike", Pike.syntaxExtensions), ("Postscript", Postscript.syntaxExtensions), ("Prolog", Prolog.syntaxExtensions), ("Pure", Pure.syntaxExtensions), ("Python", Python.syntaxExtensions), ("R", R.syntaxExtensions), ("Relaxng", Relaxng.syntaxExtensions), ("Relaxngcompact", Relaxngcompact.syntaxExtensions), ("Rest", Rest.syntaxExtensions), ("Rhtml", Rhtml.syntaxExtensions), ("Roff", Roff.syntaxExtensions), ("Ruby", Ruby.syntaxExtensions), ("Rust", Rust.syntaxExtensions), ("Scala", Scala.syntaxExtensions), ("Scheme", Scheme.syntaxExtensions), ("Sci", Sci.syntaxExtensions), ("Sed", Sed.syntaxExtensions), ("Sgml", Sgml.syntaxExtensions), ("Sql", Sql.syntaxExtensions), ("SqlMysql", SqlMysql.syntaxExtensions), ("SqlPostgresql", SqlPostgresql.syntaxExtensions), ("Tcl", Tcl.syntaxExtensions), ("Tcsh", Tcsh.syntaxExtensions), ("Texinfo", Texinfo.syntaxExtensions), ("Verilog", Verilog.syntaxExtensions), ("Vhdl", Vhdl.syntaxExtensions), ("Xml", Xml.syntaxExtensions), ("Xorg", Xorg.syntaxExtensions), ("Xslt", Xslt.syntaxExtensions), ("Xul", Xul.syntaxExtensions), ("Yacc", Yacc.syntaxExtensions), ("Yaml", Yaml.syntaxExtensions), ("Zsh", Zsh.syntaxExtensions)]  -- | List of full names of languages. languageFullNames :: [(String, String)]-languageFullNames = [("Abc", Abc.syntaxName), ("Actionscript", Actionscript.syntaxName), ("Ada", Ada.syntaxName), ("Agda", Agda.syntaxName), ("Alert", Alert.syntaxName), ("Alert_indent", Alert_indent.syntaxName), ("Apache", Apache.syntaxName), ("Asn1", Asn1.syntaxName), ("Asp", Asp.syntaxName), ("Awk", Awk.syntaxName), ("Bash", Bash.syntaxName), ("Bibtex", Bibtex.syntaxName), ("Boo", Boo.syntaxName), ("C", C.syntaxName), ("Changelog", Changelog.syntaxName), ("Clojure", Clojure.syntaxName), ("Cmake", Cmake.syntaxName), ("Coffee", Coffee.syntaxName), ("Coldfusion", Coldfusion.syntaxName), ("Commonlisp", Commonlisp.syntaxName), ("Cpp", Cpp.syntaxName), ("Cs", Cs.syntaxName), ("Css", Css.syntaxName), ("Curry", Curry.syntaxName), ("D", D.syntaxName), ("Diff", Diff.syntaxName), ("Djangotemplate", Djangotemplate.syntaxName), ("Dockerfile", Dockerfile.syntaxName), ("Dot", Dot.syntaxName), ("Doxygen", Doxygen.syntaxName), ("Doxygenlua", Doxygenlua.syntaxName), ("Dtd", Dtd.syntaxName), ("Eiffel", Eiffel.syntaxName), ("Email", Email.syntaxName), ("Erlang", Erlang.syntaxName), ("Fasm", Fasm.syntaxName), ("Fortran", Fortran.syntaxName), ("Fsharp", Fsharp.syntaxName), ("Gcc", Gcc.syntaxName), ("Glsl", Glsl.syntaxName), ("Gnuassembler", Gnuassembler.syntaxName), ("Go", Go.syntaxName), ("Haskell", Haskell.syntaxName), ("Haxe", Haxe.syntaxName), ("Html", Html.syntaxName), ("Idris", Idris.syntaxName), ("Ini", Ini.syntaxName), ("Isocpp", Isocpp.syntaxName), ("Java", Java.syntaxName), ("Javadoc", Javadoc.syntaxName), ("Javascript", Javascript.syntaxName), ("Json", Json.syntaxName), ("Jsp", Jsp.syntaxName), ("Julia", Julia.syntaxName), ("Kotlin", Kotlin.syntaxName), ("Latex", Latex.syntaxName), ("Lex", Lex.syntaxName), ("Lilypond", Lilypond.syntaxName), ("LiterateCurry", LiterateCurry.syntaxName), ("LiterateHaskell", LiterateHaskell.syntaxName), ("Llvm", Llvm.syntaxName), ("Lua", Lua.syntaxName), ("M4", M4.syntaxName), ("Makefile", Makefile.syntaxName), ("Mandoc", Mandoc.syntaxName), ("Markdown", Markdown.syntaxName), ("Mathematica", Mathematica.syntaxName), ("Matlab", Matlab.syntaxName), ("Maxima", Maxima.syntaxName), ("Mediawiki", Mediawiki.syntaxName), ("Metafont", Metafont.syntaxName), ("Mips", Mips.syntaxName), ("Modelines", Modelines.syntaxName), ("Modula2", Modula2.syntaxName), ("Modula3", Modula3.syntaxName), ("Monobasic", Monobasic.syntaxName), ("Nasm", Nasm.syntaxName), ("Noweb", Noweb.syntaxName), ("Objectivec", Objectivec.syntaxName), ("Objectivecpp", Objectivecpp.syntaxName), ("Ocaml", Ocaml.syntaxName), ("Octave", Octave.syntaxName), ("Opencl", Opencl.syntaxName), ("Pascal", Pascal.syntaxName), ("Perl", Perl.syntaxName), ("Php", Php.syntaxName), ("Pike", Pike.syntaxName), ("Postscript", Postscript.syntaxName), ("Prolog", Prolog.syntaxName), ("Pure", Pure.syntaxName), ("Python", Python.syntaxName), ("R", R.syntaxName), ("Relaxng", Relaxng.syntaxName), ("Relaxngcompact", Relaxngcompact.syntaxName), ("Rest", Rest.syntaxName), ("Rhtml", Rhtml.syntaxName), ("Roff", Roff.syntaxName), ("Ruby", Ruby.syntaxName), ("Rust", Rust.syntaxName), ("Scala", Scala.syntaxName), ("Scheme", Scheme.syntaxName), ("Sci", Sci.syntaxName), ("Sed", Sed.syntaxName), ("Sgml", Sgml.syntaxName), ("Sql", Sql.syntaxName), ("SqlMysql", SqlMysql.syntaxName), ("SqlPostgresql", SqlPostgresql.syntaxName), ("Tcl", Tcl.syntaxName), ("Tcsh", Tcsh.syntaxName), ("Texinfo", Texinfo.syntaxName), ("Verilog", Verilog.syntaxName), ("Vhdl", Vhdl.syntaxName), ("Xml", Xml.syntaxName), ("Xorg", Xorg.syntaxName), ("Xslt", Xslt.syntaxName), ("Xul", Xul.syntaxName), ("Yacc", Yacc.syntaxName), ("Yaml", Yaml.syntaxName), ("Zsh", Zsh.syntaxName)]+languageFullNames = [("Abc", Abc.syntaxName), ("Actionscript", Actionscript.syntaxName), ("Ada", Ada.syntaxName), ("Agda", Agda.syntaxName), ("Alert", Alert.syntaxName), ("Alert_indent", Alert_indent.syntaxName), ("Apache", Apache.syntaxName), ("Asn1", Asn1.syntaxName), ("Asp", Asp.syntaxName), ("Awk", Awk.syntaxName), ("Bash", Bash.syntaxName), ("Bibtex", Bibtex.syntaxName), ("Boo", Boo.syntaxName), ("C", C.syntaxName), ("Changelog", Changelog.syntaxName), ("Clojure", Clojure.syntaxName), ("Cmake", Cmake.syntaxName), ("Coffee", Coffee.syntaxName), ("Coldfusion", Coldfusion.syntaxName), ("Commonlisp", Commonlisp.syntaxName), ("Cpp", Cpp.syntaxName), ("Cs", Cs.syntaxName), ("Css", Css.syntaxName), ("Curry", Curry.syntaxName), ("D", D.syntaxName), ("Diff", Diff.syntaxName), ("Djangotemplate", Djangotemplate.syntaxName), ("Dockerfile", Dockerfile.syntaxName), ("Dot", Dot.syntaxName), ("Doxygen", Doxygen.syntaxName), ("Doxygenlua", Doxygenlua.syntaxName), ("Dtd", Dtd.syntaxName), ("Eiffel", Eiffel.syntaxName), ("Elixir", Elixir.syntaxName), ("Email", Email.syntaxName), ("Erlang", Erlang.syntaxName), ("Fasm", Fasm.syntaxName), ("Fortran", Fortran.syntaxName), ("Fsharp", Fsharp.syntaxName), ("Gcc", Gcc.syntaxName), ("Glsl", Glsl.syntaxName), ("Gnuassembler", Gnuassembler.syntaxName), ("Go", Go.syntaxName), ("Hamlet", Hamlet.syntaxName), ("Haskell", Haskell.syntaxName), ("Haxe", Haxe.syntaxName), ("Html", Html.syntaxName), ("Idris", Idris.syntaxName), ("Ini", Ini.syntaxName), ("Isocpp", Isocpp.syntaxName), ("Java", Java.syntaxName), ("Javadoc", Javadoc.syntaxName), ("Javascript", Javascript.syntaxName), ("Json", Json.syntaxName), ("Jsp", Jsp.syntaxName), ("Julia", Julia.syntaxName), ("Kotlin", Kotlin.syntaxName), ("Latex", Latex.syntaxName), ("Lex", Lex.syntaxName), ("Lilypond", Lilypond.syntaxName), ("LiterateCurry", LiterateCurry.syntaxName), ("LiterateHaskell", LiterateHaskell.syntaxName), ("Llvm", Llvm.syntaxName), ("Lua", Lua.syntaxName), ("M4", M4.syntaxName), ("Makefile", Makefile.syntaxName), ("Mandoc", Mandoc.syntaxName), ("Markdown", Markdown.syntaxName), ("Mathematica", Mathematica.syntaxName), ("Matlab", Matlab.syntaxName), ("Maxima", Maxima.syntaxName), ("Mediawiki", Mediawiki.syntaxName), ("Metafont", Metafont.syntaxName), ("Mips", Mips.syntaxName), ("Modelines", Modelines.syntaxName), ("Modula2", Modula2.syntaxName), ("Modula3", Modula3.syntaxName), ("Monobasic", Monobasic.syntaxName), ("Nasm", Nasm.syntaxName), ("Noweb", Noweb.syntaxName), ("Objectivec", Objectivec.syntaxName), ("Objectivecpp", Objectivecpp.syntaxName), ("Ocaml", Ocaml.syntaxName), ("Octave", Octave.syntaxName), ("Opencl", Opencl.syntaxName), ("Pascal", Pascal.syntaxName), ("Perl", Perl.syntaxName), ("Php", Php.syntaxName), ("Pike", Pike.syntaxName), ("Postscript", Postscript.syntaxName), ("Prolog", Prolog.syntaxName), ("Pure", Pure.syntaxName), ("Python", Python.syntaxName), ("R", R.syntaxName), ("Relaxng", Relaxng.syntaxName), ("Relaxngcompact", Relaxngcompact.syntaxName), ("Rest", Rest.syntaxName), ("Rhtml", Rhtml.syntaxName), ("Roff", Roff.syntaxName), ("Ruby", Ruby.syntaxName), ("Rust", Rust.syntaxName), ("Scala", Scala.syntaxName), ("Scheme", Scheme.syntaxName), ("Sci", Sci.syntaxName), ("Sed", Sed.syntaxName), ("Sgml", Sgml.syntaxName), ("Sql", Sql.syntaxName), ("SqlMysql", SqlMysql.syntaxName), ("SqlPostgresql", SqlPostgresql.syntaxName), ("Tcl", Tcl.syntaxName), ("Tcsh", Tcsh.syntaxName), ("Texinfo", Texinfo.syntaxName), ("Verilog", Verilog.syntaxName), ("Vhdl", Vhdl.syntaxName), ("Xml", Xml.syntaxName), ("Xorg", Xorg.syntaxName), ("Xslt", Xslt.syntaxName), ("Xul", Xul.syntaxName), ("Yacc", Yacc.syntaxName), ("Yaml", Yaml.syntaxName), ("Zsh", Zsh.syntaxName)]  languageShortNames :: [(String, String)] languageShortNames =@@ -172,7 +174,7 @@ -- extension (if unique). -- The parsers read the input lazily and parse line by line; -- results are returned immediately.--- Supported languages: @abc@, @actionscript@, @ada@, @agda@, @alert@, @alert_indent@, @apache@, @asn1@, @asp@, @awk@, @bash@, @bibtex@, @boo@, @c@, @changelog@, @clojure@, @cmake@, @coffee@, @coldfusion@, @commonlisp@, @cpp@, @cs@, @css@, @curry@, @d@, @diff@, @djangotemplate@, @dockerfile@, @dot@, @doxygen@, @doxygenlua@, @dtd@, @eiffel@, @email@, @erlang@, @fasm@, @fortran@, @fsharp@, @gcc@, @glsl@, @gnuassembler@, @go@, @haskell@, @haxe@, @html@, @idris@, @ini@, @isocpp@, @java@, @javadoc@, @javascript@, @json@, @jsp@, @julia@, @kotlin@, @latex@, @lex@, @lilypond@, @literatecurry@, @literatehaskell@, @llvm@, @lua@, @m4@, @makefile@, @mandoc@, @markdown@, @mathematica@, @matlab@, @maxima@, @mediawiki@, @metafont@, @mips@, @modelines@, @modula2@, @modula3@, @monobasic@, @nasm@, @noweb@, @objectivec@, @objectivecpp@, @ocaml@, @octave@, @opencl@, @pascal@, @perl@, @php@, @pike@, @postscript@, @prolog@, @pure@, @python@, @r@, @relaxng@, @relaxngcompact@, @rest@, @rhtml@, @roff@, @ruby@, @rust@, @scala@, @scheme@, @sci@, @sed@, @sgml@, @sql@, @sqlmysql@, @sqlpostgresql@, @tcl@, @tcsh@, @texinfo@, @verilog@, @vhdl@, @xml@, @xorg@, @xslt@, @xul@, @yacc@, @yaml@, @zsh@.+-- Supported languages: @abc@, @actionscript@, @ada@, @agda@, @alert@, @alert_indent@, @apache@, @asn1@, @asp@, @awk@, @bash@, @bibtex@, @boo@, @c@, @changelog@, @clojure@, @cmake@, @coffee@, @coldfusion@, @commonlisp@, @cpp@, @cs@, @css@, @curry@, @d@, @diff@, @djangotemplate@, @dockerfile@, @dot@, @doxygen@, @doxygenlua@, @dtd@, @eiffel@, @elixir@, @email@, @erlang@, @fasm@, @fortran@, @fsharp@, @gcc@, @glsl@, @gnuassembler@, @go@, @hamlet@, @haskell@, @haxe@, @html@, @idris@, @ini@, @isocpp@, @java@, @javadoc@, @javascript@, @json@, @jsp@, @julia@, @kotlin@, @latex@, @lex@, @lilypond@, @literatecurry@, @literatehaskell@, @llvm@, @lua@, @m4@, @makefile@, @mandoc@, @markdown@, @mathematica@, @matlab@, @maxima@, @mediawiki@, @metafont@, @mips@, @modelines@, @modula2@, @modula3@, @monobasic@, @nasm@, @noweb@, @objectivec@, @objectivecpp@, @ocaml@, @octave@, @opencl@, @pascal@, @perl@, @php@, @pike@, @postscript@, @prolog@, @pure@, @python@, @r@, @relaxng@, @relaxngcompact@, @rest@, @rhtml@, @roff@, @ruby@, @rust@, @scala@, @scheme@, @sci@, @sed@, @sgml@, @sql@, @sqlmysql@, @sqlpostgresql@, @tcl@, @tcsh@, @texinfo@, @verilog@, @vhdl@, @xml@, @xorg@, @xslt@, @xul@, @yacc@, @yaml@, @zsh@. highlightAs :: String         -- ^ Language syntax (e.g. "haskell") or extension (e.g. "hs").             -> String         -- ^ Source code to highlight             -> [SourceLine]   -- ^ List of highlighted source lines@@ -221,6 +223,7 @@         "doxygenlua" -> Doxygenlua.highlight         "dtd" -> Dtd.highlight         "eiffel" -> Eiffel.highlight+        "elixir" -> Elixir.highlight         "email" -> Email.highlight         "erlang" -> Erlang.highlight         "fasm" -> Fasm.highlight@@ -230,6 +233,7 @@         "glsl" -> Glsl.highlight         "gnuassembler" -> Gnuassembler.highlight         "go" -> Go.highlight+        "hamlet" -> Hamlet.highlight         "haskell" -> Haskell.highlight         "haxe" -> Haxe.highlight         "html" -> Html.highlight
+ Text/Highlighting/Kate/Syntax/Elixir.hs view
@@ -0,0 +1,298 @@+{- This module was generated from data in the Kate syntax+   highlighting file elixir.xml, version 0.1, by Rubén Caro (ruben.caro.estevez@gmail.com) -}++module Text.Highlighting.Kate.Syntax.Elixir+          (highlight, parseExpression, syntaxName, syntaxExtensions)+where+import Text.Highlighting.Kate.Types+import Text.Highlighting.Kate.Common+import qualified Text.Highlighting.Kate.Syntax.Markdown+import Text.ParserCombinators.Parsec hiding (State)+import Control.Monad.State+import Data.Char (isSpace)+import qualified Data.Set as Set++-- | Full name of language.+syntaxName :: String+syntaxName = "Elixir"++-- | Filename extensions for this language.+syntaxExtensions :: String+syntaxExtensions = "*.ex;*.exs;*.eex;*.xml.eex;*.js.eex"++-- | Highlight source code using this syntax definition.+highlight :: String -> [SourceLine]+highlight input = evalState (mapM parseSourceLine $ lines input) startingState++parseSourceLine :: String -> State SyntaxState SourceLine+parseSourceLine = mkParseSourceLine (parseExpression Nothing)++-- | Parse an expression using appropriate local context.+parseExpression :: Maybe (String,String)+                -> KateParser Token+parseExpression mbcontext = do+  (lang,cont) <- maybe currentContext return mbcontext+  result <- parseRules (lang,cont)+  optional $ do eof+                updateState $ \st -> st{ synStPrevChar = '\n' }+                pEndLine+  return result++startingState = SyntaxState {synStContexts = [("Elixir","Normal")], synStLineNumber = 0, synStPrevChar = '\n', synStPrevNonspace = False, synStContinuation = False, synStCaseSensitive = True, synStKeywordCaseSensitive = True, synStCaptures = []}++pEndLine = do+  updateState $ \st -> st{ synStPrevNonspace = False }+  context <- currentContext+  contexts <- synStContexts `fmap` getState+  st <- getState+  if length contexts >= 2+    then case context of+      _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False }+      ("Elixir","Normal") -> return ()+      ("Elixir","Find closing block brace") -> return ()+      ("Elixir","Documentation") -> return ()+      ("Elixir","Triple Quoted String") -> return ()+      ("Elixir","Quoted String") -> return ()+      ("Elixir","Apostrophed String") -> return ()+      ("Elixir","Command String") -> return ()+      ("Elixir","RegEx 1") -> return ()+      ("Elixir","Subst") -> return ()+      ("Elixir","Short Subst") -> (popContext) >> pEndLine+      ("Elixir","Comment Line") -> (popContext) >> pEndLine+      ("Elixir","General Comment") -> (popContext) >> pEndLine+      ("Elixir","regexpr_rules") -> return ()+      ("Elixir","Markdown Code") -> return ()+      _ -> return ()+    else return ()++withAttribute attr txt = do+  when (null txt) $ fail "Parser matched no text"+  updateState $ \st -> st { synStPrevChar = last txt+                          , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) }+  return (attr, txt)++list_keywords = Set.fromList $ words $ "do end case bc lc for if cond unless try receive exit after rescue catch else raise throw quote unquote super and not or when xor in inlist inbits"+list_pseudo'2dvariables = Set.fromList $ words $ "nil true false"+list_definitions = Set.fromList $ words $ "fn defmodule def defp defprotocol defimpl defrecord defstruct defmacro defmacrop defdelegate defcallback defmacrocallback defexception defoverridable"+list_mixin'2dmacros = Set.fromList $ words $ "import require alias use"++regex_'23'21'5c'2f'2e'2a = compileRegex True "#!\\/.*"+regex_'5cb'5b'5fA'2dZ'5d'2b'5bA'2dZ'5f0'2d9'5d'2b'5cb = compileRegex True "\\b[_A-Z]+[A-Z_0-9]+\\b"+regex_'5cb'5bA'2dZ'5d'2b'5f'2a'28'5b0'2d9'5d'7c'5ba'2dz'5d'29'5b'5fa'2dzA'2dZ0'2d9'5d'2a'5cb = compileRegex True "\\b[A-Z]+_*([0-9]|[a-z])[_a-zA-Z0-9]*\\b"+regex_'5cb'5c'2d'3f0'5bxX'5d'28'5b0'2d9a'2dfA'2dF'5d'7c'5f'5b0'2d9a'2dfA'2dF'5d'29'2b = compileRegex True "\\b\\-?0[xX]([0-9a-fA-F]|_[0-9a-fA-F])+"+regex_'5cb'5c'2d'3f0'5bbB'5d'28'5b01'5d'7c'5f'5b01'5d'29'2b = compileRegex True "\\b\\-?0[bB]([01]|_[01])+"+regex_'5cb'5c'2d'3f0'5b1'2d7'5d'28'5b0'2d7'5d'7c'5f'5b0'2d7'5d'29'2a = compileRegex True "\\b\\-?0[1-7]([0-7]|_[0-7])*"+regex_'5cb'5c'2d'3f'5b0'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'5c'2e'5b0'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'28'5beE'5d'5c'2d'3f'5b1'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'28'5c'2e'5b0'2d9'5d'2a'29'3f'29'3f = compileRegex True "\\b\\-?[0-9]([0-9]|_[0-9])*\\.[0-9]([0-9]|_[0-9])*([eE]\\-?[1-9]([0-9]|_[0-9])*(\\.[0-9]*)?)?"+regex_'5cb'5c'2d'3f'5b1'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'5cb = compileRegex True "\\b\\-?[1-9]([0-9]|_[0-9])*\\b"+regex_'5cs'5b'5c'3f'5c'3a'5c'25'5d'5cs = compileRegex True "\\s[\\?\\:\\%]\\s"+regex_'5b'7c'26'3c'3e'5c'5e'5c'2b'2a'7e'5c'2d'3d'5d'2b = compileRegex True "[|&<>\\^\\+*~\\-=]+"+regex_'5cs'21 = compileRegex True "\\s!"+regex_'2f'3d'5cs = compileRegex True "/=\\s"+regex_'3a'28'40'7b1'2c2'7d'7c'5c'24'29'3f'5ba'2dzA'2dZ'5f'5d'5ba'2dzA'2dZ0'2d9'5f'5d'2a'5b'3d'3f'21'5d'3f = compileRegex True ":(@{1,2}|\\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?"+regex_'5cb'28'40'7b1'2c2'7d'7c'5c'24'29'3f'5ba'2dzA'2dZ'5f'5d'5ba'2dzA'2dZ0'2d9'5f'5d'2a'5b'3d'3f'21'5d'3f'3a = compileRegex True "\\b(@{1,2}|\\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?:"+regex_'3a'5c'5b'5c'5d'3d'3f = compileRegex True ":\\[\\]=?"+regex_'40'28module'29'3fdoc'5cs'2b'22'22'22 = compileRegex True "@(module)?doc\\s+\"\"\""+regex_'40'5ba'2dzA'2dZ'5f0'2d9'5d'2b = compileRegex True "@[a-zA-Z_0-9]+"+regex_'5cs'2a'23'2b'5cs'2e'2a'5b'23'5d'3f'24 = compileRegex True "\\s*#+\\s.*[#]?$"+regex_'5cs'2a'5b'5c'2a'5c'2b'5c'2d'5d'5cs = compileRegex True "\\s*[\\*\\+\\-]\\s"+regex_'5cs'2a'5b'5cd'5d'2b'5c'2e'5cs = compileRegex True "\\s*[\\d]+\\.\\s"+regex_'5cs'2a'5c'60'5c'60'5c'60'5cs'2a'24 = compileRegex True "\\s*\\`\\`\\`\\s*$"+regex_'5c'5c'5c'22 = compileRegex True "\\\\\\\""+regex_'23'40'7b1'2c2'7d = compileRegex True "#@{1,2}"+regex_'5c'5c'5c'27 = compileRegex True "\\\\\\'"+regex_'5c'5c'5c'60 = compileRegex True "\\\\\\`"+regex_'5c'5c'5c'2f = compileRegex True "\\\\\\/"+regex_'2f'5buiomxn'5d'2a = compileRegex True "/[uiomxn]*"+regex_'5cw'28'3f'21'5cw'29 = compileRegex True "\\w(?!\\w)"++parseRules ("Elixir","Normal") =+  (((pColumn 0 >> pRegExpr regex_'23'21'5c'2f'2e'2a >>= withAttribute KeywordTok))+   <|>+   ((pKeyword " \n\t.():+,-<=>%&*/;[]^{|}~\\" list_keywords >>= withAttribute KeywordTok))+   <|>+   ((pKeyword " \n\t.():+,-<=>%&*/;[]^{|}~\\" list_definitions >>= withAttribute KeywordTok))+   <|>+   ((pKeyword " \n\t.():+,-<=>%&*/;[]^{|}~\\" list_pseudo'2dvariables >>= withAttribute DecValTok))+   <|>+   ((pKeyword " \n\t.():+,-<=>%&*/;[]^{|}~\\" list_mixin'2dmacros >>= withAttribute KeywordTok))+   <|>+   ((pRegExpr regex_'5cb'5b'5fA'2dZ'5d'2b'5bA'2dZ'5f0'2d9'5d'2b'5cb >>= withAttribute DataTypeTok))+   <|>+   ((pRegExpr regex_'5cb'5bA'2dZ'5d'2b'5f'2a'28'5b0'2d9'5d'7c'5ba'2dz'5d'29'5b'5fa'2dzA'2dZ0'2d9'5d'2a'5cb >>= withAttribute DataTypeTok))+   <|>+   ((pRegExpr regex_'5cb'5c'2d'3f0'5bxX'5d'28'5b0'2d9a'2dfA'2dF'5d'7c'5f'5b0'2d9a'2dfA'2dF'5d'29'2b >>= withAttribute BaseNTok))+   <|>+   ((pRegExpr regex_'5cb'5c'2d'3f0'5bbB'5d'28'5b01'5d'7c'5f'5b01'5d'29'2b >>= withAttribute BaseNTok))+   <|>+   ((pRegExpr regex_'5cb'5c'2d'3f0'5b1'2d7'5d'28'5b0'2d7'5d'7c'5f'5b0'2d7'5d'29'2a >>= withAttribute BaseNTok))+   <|>+   ((pRegExpr regex_'5cb'5c'2d'3f'5b0'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'5c'2e'5b0'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'28'5beE'5d'5c'2d'3f'5b1'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'28'5c'2e'5b0'2d9'5d'2a'29'3f'29'3f >>= withAttribute FloatTok))+   <|>+   ((pRegExpr regex_'5cb'5c'2d'3f'5b1'2d9'5d'28'5b0'2d9'5d'7c'5f'5b0'2d9'5d'29'2a'5cb >>= withAttribute DecValTok))+   <|>+   ((pInt >>= withAttribute DecValTok))+   <|>+   ((pHlCChar >>= withAttribute CharTok))+   <|>+   ((pDetectChar False '.' >>= withAttribute NormalTok))+   <|>+   ((pDetect2Chars False '&' '&' >>= withAttribute NormalTok))+   <|>+   ((pDetect2Chars False '|' '|' >>= withAttribute NormalTok))+   <|>+   ((pRegExpr regex_'5cs'5b'5c'3f'5c'3a'5c'25'5d'5cs >>= withAttribute NormalTok))+   <|>+   ((pRegExpr regex_'5b'7c'26'3c'3e'5c'5e'5c'2b'2a'7e'5c'2d'3d'5d'2b >>= withAttribute NormalTok))+   <|>+   ((pRegExpr regex_'5cs'21 >>= withAttribute NormalTok))+   <|>+   ((pRegExpr regex_'2f'3d'5cs >>= withAttribute NormalTok))+   <|>+   ((pString False "%=" >>= withAttribute NormalTok))+   <|>+   ((pRegExpr regex_'3a'28'40'7b1'2c2'7d'7c'5c'24'29'3f'5ba'2dzA'2dZ'5f'5d'5ba'2dzA'2dZ0'2d9'5f'5d'2a'5b'3d'3f'21'5d'3f >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'5cb'28'40'7b1'2c2'7d'7c'5c'24'29'3f'5ba'2dzA'2dZ'5f'5d'5ba'2dzA'2dZ0'2d9'5f'5d'2a'5b'3d'3f'21'5d'3f'3a >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'3a'5c'5b'5c'5d'3d'3f >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'40'28module'29'3fdoc'5cs'2b'22'22'22 >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Documentation"))+   <|>+   ((pString False "\"\"\"" >>= withAttribute StringTok) >>~ pushContext ("Elixir","Triple Quoted String"))+   <|>+   ((pDetectChar False '"' >>= withAttribute StringTok) >>~ pushContext ("Elixir","Quoted String"))+   <|>+   ((pDetectChar False '\'' >>= withAttribute StringTok) >>~ pushContext ("Elixir","Apostrophed String"))+   <|>+   ((pDetectChar False '`' >>= withAttribute StringTok) >>~ pushContext ("Elixir","Command String"))+   <|>+   ((pString False "?#" >>= withAttribute NormalTok))+   <|>+   ((pDetectChar False '#' >>= withAttribute CommentTok) >>~ pushContext ("Elixir","General Comment"))+   <|>+   ((pDetectChar False '[' >>= withAttribute NormalTok))+   <|>+   ((pDetectChar False ']' >>= withAttribute NormalTok))+   <|>+   ((pRegExpr regex_'40'5ba'2dzA'2dZ'5f0'2d9'5d'2b >>= withAttribute OtherTok))+   <|>+   ((pDetectChar False '/' >>= withAttribute OtherTok) >>~ pushContext ("Elixir","RegEx 1"))+   <|>+   ((pDetectChar False ')' >>= withAttribute NormalTok))+   <|>+   ((pDetectIdentifier >>= withAttribute NormalTok))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Normal")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Elixir","Find closing block brace") =+  (((pDetectChar False '}' >>= withAttribute NormalTok) >>~ (popContext))+   <|>+   ((parseRules ("Elixir","Normal")))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Find closing block brace")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Elixir","Documentation") =+  (((pString False "\"\"\"" >>= withAttribute OtherTok) >>~ (popContext))+   <|>+   ((pColumn 0 >> pRegExpr regex_'5cs'2a'23'2b'5cs'2e'2a'5b'23'5d'3f'24 >>= withAttribute FunctionTok))+   <|>+   ((pColumn 0 >> pRegExpr regex_'5cs'2a'5b'5c'2a'5c'2b'5c'2d'5d'5cs >>= withAttribute FunctionTok))+   <|>+   ((pColumn 0 >> pRegExpr regex_'5cs'2a'5b'5cd'5d'2b'5c'2e'5cs >>= withAttribute FunctionTok))+   <|>+   ((pColumn 0 >> pRegExpr regex_'5cs'2a'5c'60'5c'60'5c'60'5cs'2a'24 >>= withAttribute FunctionTok) >>~ pushContext ("Elixir","Markdown Code"))+   <|>+   ((pDetectSpaces >>= withAttribute CommentTok))+   <|>+   ((Text.Highlighting.Kate.Syntax.Markdown.parseExpression (Just ("Markdown","Normal Text")) >>= ((withAttribute CommentTok) . snd)))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Documentation")) >> pDefault >>= withAttribute CommentTok))++parseRules ("Elixir","Triple Quoted String") =+  (((pString False "\"\"\"" >>= withAttribute StringTok) >>~ (popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Triple Quoted String")) >> pDefault >>= withAttribute StringTok))++parseRules ("Elixir","Quoted String") =+  (((pString False "\\\\" >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'5c'5c'5c'22 >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'23'40'7b1'2c2'7d >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Short Subst"))+   <|>+   ((pDetect2Chars False '#' '{' >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Subst"))+   <|>+   ((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Quoted String")) >> pDefault >>= withAttribute StringTok))++parseRules ("Elixir","Apostrophed String") =+  (((pString False "\\\\" >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'5c'5c'5c'27 >>= withAttribute StringTok))+   <|>+   ((pDetectChar False '\'' >>= withAttribute StringTok) >>~ (popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Apostrophed String")) >> pDefault >>= withAttribute StringTok))++parseRules ("Elixir","Command String") =+  (((pString False "\\\\" >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'5c'5c'5c'60 >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'23'40'7b1'2c2'7d >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Short Subst"))+   <|>+   ((pDetect2Chars False '#' '{' >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Subst"))+   <|>+   ((pDetectChar False '`' >>= withAttribute StringTok) >>~ (popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Command String")) >> pDefault >>= withAttribute StringTok))++parseRules ("Elixir","RegEx 1") =+  (((pRegExpr regex_'5c'5c'5c'2f >>= withAttribute OtherTok))+   <|>+   ((pRegExpr regex_'23'40'7b1'2c2'7d >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Short Subst"))+   <|>+   ((pDetect2Chars False '#' '{' >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Subst"))+   <|>+   ((pRegExpr regex_'2f'5buiomxn'5d'2a >>= withAttribute OtherTok) >>~ (popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","RegEx 1")) >> pDefault >>= withAttribute OtherTok))++parseRules ("Elixir","Subst") =+  (((pDetectChar False '}' >>= withAttribute OtherTok) >>~ (popContext))+   <|>+   ((parseRules ("Elixir","Normal")))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Subst")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Elixir","Short Subst") =+  (((pRegExpr regex_'23'40'7b1'2c2'7d >>= withAttribute OtherTok))+   <|>+   ((pRegExpr regex_'5cw'28'3f'21'5cw'29 >>= withAttribute OtherTok) >>~ (popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Short Subst")) >> pDefault >>= withAttribute OtherTok))++parseRules ("Elixir","Comment Line") =+  (currentContext >>= \x -> guard (x == ("Elixir","Comment Line")) >> pDefault >>= withAttribute CommentTok)++parseRules ("Elixir","General Comment") =+  (currentContext >>= \x -> guard (x == ("Elixir","General Comment")) >> pDefault >>= withAttribute CommentTok)++parseRules ("Elixir","regexpr_rules") =+  (((pDetect2Chars False '\\' '\\' >>= withAttribute OtherTok))+   <|>+   ((pRegExpr regex_'23'40'7b1'2c2'7d >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Short Subst"))+   <|>+   ((pDetect2Chars False '#' '{' >>= withAttribute OtherTok) >>~ pushContext ("Elixir","Subst"))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","regexpr_rules")) >> pDefault >>= withAttribute OtherTok))++parseRules ("Elixir","Markdown Code") =+  (((pColumn 0 >> pRegExpr regex_'5cs'2a'5c'60'5c'60'5c'60'5cs'2a'24 >>= withAttribute FunctionTok) >>~ (popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Elixir","Markdown Code")) >> pDefault >>= withAttribute FunctionTok))++parseRules ("Markdown", _) = Text.Highlighting.Kate.Syntax.Markdown.parseExpression Nothing++parseRules x = parseRules ("Elixir","Normal") <|> fail ("Unknown context" ++ show x)
+ Text/Highlighting/Kate/Syntax/Hamlet.hs view
@@ -0,0 +1,187 @@+{- This module was generated from data in the Kate syntax+   highlighting file hamlet.xml, version 0.1, by Bastian Holst (bastianholst@gmx.de) -}++module Text.Highlighting.Kate.Syntax.Hamlet+          (highlight, parseExpression, syntaxName, syntaxExtensions)+where+import Text.Highlighting.Kate.Types+import Text.Highlighting.Kate.Common+import qualified Text.Highlighting.Kate.Syntax.Haskell+import Text.ParserCombinators.Parsec hiding (State)+import Control.Monad.State+import Data.Char (isSpace)++-- | Full name of language.+syntaxName :: String+syntaxName = "Hamlet"++-- | Filename extensions for this language.+syntaxExtensions :: String+syntaxExtensions = "*.hamlet"++-- | Highlight source code using this syntax definition.+highlight :: String -> [SourceLine]+highlight input = evalState (mapM parseSourceLine $ lines input) startingState++parseSourceLine :: String -> State SyntaxState SourceLine+parseSourceLine = mkParseSourceLine (parseExpression Nothing)++-- | Parse an expression using appropriate local context.+parseExpression :: Maybe (String,String)+                -> KateParser Token+parseExpression mbcontext = do+  (lang,cont) <- maybe currentContext return mbcontext+  result <- parseRules (lang,cont)+  optional $ do eof+                updateState $ \st -> st{ synStPrevChar = '\n' }+                pEndLine+  return result++startingState = SyntaxState {synStContexts = [("Hamlet","Normal Text")], synStLineNumber = 0, synStPrevChar = '\n', synStPrevNonspace = False, synStContinuation = False, synStCaseSensitive = True, synStKeywordCaseSensitive = True, synStCaptures = []}++pEndLine = do+  updateState $ \st -> st{ synStPrevNonspace = False }+  context <- currentContext+  contexts <- synStContexts `fmap` getState+  st <- getState+  if length contexts >= 2+    then case context of+      _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False }+      ("Hamlet","Normal Text") -> (popContext) >> pEndLine+      ("Hamlet","element") -> return ()+      ("Hamlet","Logic") -> (popContext) >> pEndLine+      ("Hamlet","Code") -> return ()+      ("Hamlet","Codeline") -> (popContext) >> pEndLine+      ("Hamlet","Assignment") -> (popContext) >> pEndLine+      ("Hamlet","Attribute") -> return ()+      ("Hamlet","Value") -> return ()+      ("Hamlet","Value DQ") -> return ()+      ("Hamlet","Value SQ") -> return ()+      ("Hamlet","Value Code") -> return ()+      _ -> return ()+    else return ()++withAttribute attr txt = do+  when (null txt) $ fail "Parser matched no text"+  updateState $ \st -> st { synStPrevChar = last txt+                          , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) }+  return (attr, txt)+++regex_'3c'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a'5cb = compileRegex True "<(?![0-9])[\\w_:][\\w.:_-]*\\b"+regex_'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a = compileRegex True "(?![0-9])[\\w_:][\\w.:_-]*"+regex_'5cs'2b'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a = compileRegex True "\\s+(?![0-9])[\\w_:][\\w.:_-]*"+regex_'5c'2e'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a = compileRegex True "\\.(?![0-9])[\\w_:][\\w.:_-]*"+regex_'5cS = compileRegex True "\\S"+regex_'5b'5e'22'27'3e'5cs'5d'2b = compileRegex True "[^\"'>\\s]+"++parseRules ("Hamlet","Normal Text") =+  (((pRegExpr regex_'3c'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a'5cb >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","element"))+   <|>+   ((pString False "^{" >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Code"))+   <|>+   ((pString False "#{" >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Code"))+   <|>+   ((pString False "@{" >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Code"))+   <|>+   ((pString False "_{" >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Code"))+   <|>+   ((pFirstNonSpace >> pDetectChar False '$' >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Logic"))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Normal Text")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Hamlet","element") =+  (((pDetect2Chars False '/' '>' >>= withAttribute KeywordTok) >>~ (popContext))+   <|>+   ((pDetectChar False '>' >>= withAttribute KeywordTok) >>~ (popContext))+   <|>+   ((pColumn 0 >> pRegExpr regex_'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a >>= withAttribute OtherTok) >>~ pushContext ("Hamlet","Attribute"))+   <|>+   ((pRegExpr regex_'5cs'2b'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a >>= withAttribute OtherTok) >>~ pushContext ("Hamlet","Attribute"))+   <|>+   ((pRegExpr regex_'5c'2e'28'3f'21'5b0'2d9'5d'29'5b'5cw'5f'3a'5d'5b'5cw'2e'3a'5f'2d'5d'2a >>= withAttribute StringTok))+   <|>+   ((pRegExpr regex_'5cS >>= withAttribute ErrorTok))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","element")) >> pDefault >>= withAttribute KeywordTok))++parseRules ("Hamlet","Logic") =+  (((pRegExpr (compileRegex True "\\bif\\b") >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Codeline"))+   <|>+   ((pRegExpr (compileRegex True "\\belseif\\b") >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Codeline"))+   <|>+   ((pRegExpr (compileRegex True "\\bforall\\b") >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Assignment"))+   <|>+   ((pRegExpr (compileRegex True "\\bmaybe\\b") >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Assignment"))+   <|>+   ((pRegExpr (compileRegex True "\\belse\\b") >>= withAttribute KeywordTok))+   <|>+   ((pRegExpr (compileRegex True "\\bnothing\\b") >>= withAttribute KeywordTok))+   <|>+   ((pRegExpr regex_'5cS >>= withAttribute ErrorTok))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Logic")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Hamlet","Code") =+  (((pDetectChar False '}' >>= withAttribute KeywordTok) >>~ (popContext))+   <|>+   ((Text.Highlighting.Kate.Syntax.Haskell.parseExpression (Just ("Haskell",""))))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Code")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Hamlet","Codeline") =+  (((Text.Highlighting.Kate.Syntax.Haskell.parseExpression (Just ("Haskell",""))))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Codeline")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Hamlet","Assignment") =+  (((pString False "<-" >>= withAttribute OtherTok) >>~ pushContext ("Hamlet","Codeline"))+   <|>+   ((Text.Highlighting.Kate.Syntax.Haskell.parseExpression (Just ("Haskell",""))))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Assignment")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Hamlet","Attribute") =+  (((pDetectChar False '=' >>= withAttribute OtherTok) >>~ pushContext ("Hamlet","Value"))+   <|>+   ((pDetectChar False '>' >>= withAttribute KeywordTok) >>~ (popContext >> popContext))+   <|>+   ((pRegExpr regex_'5cS >>= withAttribute ErrorTok))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Attribute")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Hamlet","Value") =+  (((pDetectChar False '"' >>= withAttribute StringTok) >>~ pushContext ("Hamlet","Value DQ"))+   <|>+   ((pDetectChar False '\'' >>= withAttribute StringTok) >>~ pushContext ("Hamlet","Value SQ"))+   <|>+   ((pString False "@{" >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Value Code"))+   <|>+   ((pString False "#{" >>= withAttribute KeywordTok) >>~ pushContext ("Hamlet","Value Code"))+   <|>+   ((pRegExpr regex_'5b'5e'22'27'3e'5cs'5d'2b >>= withAttribute StringTok) >>~ (popContext >> popContext))+   <|>+   ((pRegExpr regex_'5cS >>= withAttribute ErrorTok))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Value")) >> pDefault >>= withAttribute StringTok))++parseRules ("Hamlet","Value DQ") =+  (((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext >> popContext >> popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Value DQ")) >> pDefault >>= withAttribute StringTok))++parseRules ("Hamlet","Value SQ") =+  (((pDetectChar False '\'' >>= withAttribute StringTok) >>~ (popContext >> popContext >> popContext))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Value SQ")) >> pDefault >>= withAttribute StringTok))++parseRules ("Hamlet","Value Code") =+  (((pDetectChar False '}' >>= withAttribute KeywordTok) >>~ (popContext >> popContext >> popContext))+   <|>+   ((Text.Highlighting.Kate.Syntax.Haskell.parseExpression (Just ("Haskell",""))))+   <|>+   (currentContext >>= \x -> guard (x == ("Hamlet","Value Code")) >> pDefault >>= withAttribute NormalTok))++parseRules ("Haskell", _) = Text.Highlighting.Kate.Syntax.Haskell.parseExpression Nothing++parseRules x = parseRules ("Hamlet","Normal Text") <|> fail ("Unknown context" ++ show x)
changelog view
@@ -1,3 +1,10 @@+highlighting-kate 0.6.2 (17 Mar 2016)++  * Added support for WordDetect (#86).+  * Added hamlet.+  * Added elixir (supernullset).+  * Fix typo in changelog (Matthias C. M. Troffaes).+ highlighting-kate 0.6.1 (12 Dec 2015)    * Fixed build on GHC 7.0 (Adam Bergmark).@@ -5,7 +12,7 @@   * Removed splitBase flag and ability to compile on base < 4.4.   * Add agda tests with unicode input (Matthias C. M. Troffaes).   * Fix 'Text.Regex.PCRE.Light: Error in regex: invalid UTF-8 string'-    error message (Matthias C. M. Traffaes).+    error message (Matthias C. M. Troffaes).   * Reapplied isocpp.xml.patch (#57).   * Added `languageByFullName` (API change).  Changed behavior of     `highlightAs` so that languages can match on "full official name"
highlighting-kate.cabal view
@@ -1,5 +1,5 @@ Name:                highlighting-kate-Version:             0.6.1+Version:             0.6.2 Cabal-Version:       >= 1.10 Build-Type:          Simple Category:            Text@@ -146,6 +146,7 @@                      Text.Highlighting.Kate.Syntax.Doxygenlua                      Text.Highlighting.Kate.Syntax.Dtd                      Text.Highlighting.Kate.Syntax.Eiffel+                     Text.Highlighting.Kate.Syntax.Elixir                      Text.Highlighting.Kate.Syntax.Email                      Text.Highlighting.Kate.Syntax.Erlang                      Text.Highlighting.Kate.Syntax.Fasm@@ -155,6 +156,7 @@                      Text.Highlighting.Kate.Syntax.Glsl                      Text.Highlighting.Kate.Syntax.Gnuassembler                      Text.Highlighting.Kate.Syntax.Go+                     Text.Highlighting.Kate.Syntax.Hamlet                      Text.Highlighting.Kate.Syntax.Haskell                      Text.Highlighting.Kate.Syntax.Haxe                      Text.Highlighting.Kate.Syntax.Html
+ xml/elixir.xml view
@@ -0,0 +1,260 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE language+  SYSTEM 'language.dtd'>+<!--+  Elixir syntax highlighting definition for Kate.+  Copyright (C) 2014  by Rubén Caro (ruben.caro.estevez@gmail.com)+  This library is free software; you can redistribute it and/or+  modify it under the terms of the GNU Library General Public+  License as published by the Free Software Foundation; either+  version 2 of the License, or (at your option) any later version.+  This library is distributed in the hope that it will be useful,+  but WITHOUT ANY WARRANTY; without even the implied warranty of+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+  Library General Public License for more details.+  You should have received a copy of the GNU Library General Public+  License along with this library; if not, write to the+  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,+  Boston, MA  02110-1301, USA.+-->+<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->+<language author="Rubén Caro (ruben.caro.estevez@gmail.com)"+          extensions="*.ex;*.exs;*.eex;*.xml.eex;*.js.eex"+          indenter="elixir"+          kateversion="3.13"+          license="GPL"+          mimetype="text/x-elixir"+          name="Elixir"+          section="Sources"+          style="elixir"+          version="0.1">+  <highlighting>+    <list name="keywords">+      <item>do</item>+      <item>end</item>+      <item>case</item>+      <item>bc</item>+      <item>lc</item>+      <item>for</item>+      <item>if</item>+      <item>cond</item>+      <item>unless</item>+      <item>try</item>+      <item>receive</item>+      <item>exit</item>+      <item>after</item>+      <item>rescue</item>+      <item>catch</item>+      <item>else</item>+      <item>raise</item>+      <item>throw</item>+      <item>quote</item>+      <item>unquote</item>+      <item>super</item>+      <item>and</item>+      <item>not</item>+      <item>or</item>+      <item>when</item>+      <item>xor</item>+      <item>in</item>+      <item>inlist</item>+      <item>inbits</item>+    </list>+    <list name="pseudo-variables">+      <item>nil</item>+      <item>true</item>+      <item>false</item>+    </list>+    <list name="definitions">+      <item>fn</item>+      <item>defmodule</item>+      <item>def</item>+      <item>defp</item>+      <item>defprotocol</item>+      <item>defimpl</item>+      <item>defrecord</item>+      <item>defstruct</item>+      <item>defmacro</item>+      <item>defmacrop</item>+      <item>defdelegate</item>+      <item>defcallback</item>+      <item>defmacrocallback</item>+      <item>defexception</item>+      <item>defoverridable</item>+    </list>+    <list name="mixin-macros">+      <item>import</item>+      <item>require</item>+      <item>alias</item>+      <item>use</item>+    </list>+    <contexts>+      <context attribute="Normal Text" lineEndContext="#stay" name="Normal">+        <!-- "shebang" line -->+        <RegExpr String="#!\/.*" attribute="Keyword" column="0" context="#stay"/>++        <!-- Defined words -->+        <keyword String="keywords" attribute="Keyword" context="#stay"/>+        <keyword String="definitions" attribute="Definition" context="#stay"/>+        <keyword String="pseudo-variables" attribute="Pseudo variable" context="#stay"/>+        <keyword String="mixin-macros" attribute="Mixin macros" context="#stay"/>++        <!-- special-character globals -->+        <RegExpr String="\b[_A-Z]+[A-Z_0-9]+\b" attribute="Global Constant" context="#stay"/>++        <!-- Generally a module or class name like "File", "MyModule_1", .. -->+        <RegExpr String="\b[A-Z]+_*([0-9]|[a-z])[_a-zA-Z0-9]*\b" attribute="Constant" context="#stay"/>++        <!-- Numeric values. Note that we have to allow underscores between two digits (thus the creepy regular expressions). -->+        <RegExpr String="\b\-?0[xX]([0-9a-fA-F]|_[0-9a-fA-F])+" attribute="Hex" context="#stay"/>+        <RegExpr String="\b\-?0[bB]([01]|_[01])+" attribute="Bin" context="#stay"/>+        <RegExpr String="\b\-?0[1-7]([0-7]|_[0-7])*" attribute="Octal" context="#stay"/>+        <RegExpr String="\b\-?[0-9]([0-9]|_[0-9])*\.[0-9]([0-9]|_[0-9])*([eE]\-?[1-9]([0-9]|_[0-9])*(\.[0-9]*)?)?" attribute="Float" context="#stay"/>+        <RegExpr String="\b\-?[1-9]([0-9]|_[0-9])*\b" attribute="Dec" context="#stay"/>+        <Int attribute="Dec" context="#stay"/>+        <HlCChar attribute="Char" context="#stay"/>+        <DetectChar attribute="Operator" char="." context="#stay"/>+        <Detect2Chars attribute="Operator" char="&amp;" char1="&amp;" context="#stay"/>+        <Detect2Chars attribute="Operator" char="|" char1="|" context="#stay"/>+        <RegExpr String="\s[\?\:\%]\s" attribute="Operator" context="#stay"/>+        <RegExpr String="[|&amp;&lt;&gt;\^\+*~\-=]+" attribute="Operator" context="#stay"/>+        <!-- regexp hack -->+        <RegExpr String="\s!" attribute="Operator" context="#stay"/>+        <RegExpr String="/=\s" attribute="Operator" context="#stay" insensitive="0"/>+        <StringDetect String="%=" attribute="Operator" context="#stay" insensitive="0"/>+        <RegExpr String=":(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?" attribute="Symbol" context="#stay"/>+        <RegExpr String="\b(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?:" attribute="Symbol" context="#stay"/>+        <RegExpr String=":\[\]=?" attribute="Symbol" context="#stay"/>+        <RegExpr String="@(module)?doc\s+&quot;&quot;&quot;" attribute="Attribute" context="Documentation"/>+        <StringDetect String="&quot;&quot;&quot;" attribute="String" context="Triple Quoted String"/>+        <DetectChar attribute="String" char="&quot;" context="Quoted String"/>+        <DetectChar attribute="Raw String" char="'" context="Apostrophed String"/>+        <DetectChar attribute="Command" char="`" context="Command String"/>+        <StringDetect String="?#" attribute="Normal Text" context="#stay"/>+        <DetectChar attribute="Comment" char="#" context="General Comment"/>+        <DetectChar attribute="Delimiter" char="[" context="#stay"/>+        <DetectChar attribute="Delimiter" char="]" context="#stay"/>+        <RegExpr String="@[a-zA-Z_0-9]+" attribute="Attribute" context="#stay"/>+        <!-- handle the different regular expression formats -->+        <DetectChar attribute="Regular Expression" char="/" context="RegEx 1"/>+        <DetectChar attribute="Normal Text" char=")" context="#stay"/>+        <DetectIdentifier attribute="Normal Text" context="#stay"/>+      </context>+      <context attribute="Normal Text" lineEndContext="#stay" name="Find closing block brace">+        <DetectChar attribute="Operator" char="}" context="#pop" endRegion="def bracketed block"/>+        <IncludeRules context="Normal"/>+      </context>+      <context attribute="DocComment" lineEndContext="#stay" name="Documentation">+        <StringDetect String="&quot;&quot;&quot;" attribute="Attribute" context="#pop"/>+        <RegExpr attribute="MarkdownHead" String="^\s*#+\s.*[#]?$"/>+        <RegExpr attribute="MarkdownBullet" String="^\s*[\*\+\-]\s"/>+        <RegExpr attribute="MarkdownNumlist" String="^\s*[\d]+\.\s"/>+        <RegExpr attribute="MarkdownCode" context="Markdown Code" String="^\s*\`\`\`\s*$"/>+        <DetectSpaces />+        <IncludeRules context="Normal Text##Markdown"/>+      </context>+      <context attribute="String" lineEndContext="#stay" name="Triple Quoted String">+        <StringDetect String="&quot;&quot;&quot;" attribute="String" context="#pop"/>+      </context>+      <context attribute="String" lineEndContext="#stay" name="Quoted String">+        <StringDetect String="\\" attribute="String" context="#stay"/>+        <RegExpr String="\\\&quot;" attribute="String" context="#stay"/>+        <RegExpr String="#@{1,2}" attribute="Substitution" context="Short Subst"/>+        <Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>+        <DetectChar attribute="String" char="&quot;" context="#pop"/>+      </context>+      <context attribute="Raw String" lineEndContext="#stay" name="Apostrophed String">+        <StringDetect String="\\" attribute="String" context="#stay"/>+        <RegExpr String="\\\'" attribute="String" context="#stay"/>+        <DetectChar attribute="Raw String" char="'" context="#pop"/>+      </context>+      <context attribute="Command" lineEndContext="#stay" name="Command String">+        <StringDetect String="\\" attribute="String" context="#stay"/>+        <RegExpr String="\\\`" attribute="String" context="#stay"/>+        <RegExpr String="#@{1,2}" attribute="Substitution" context="Short Subst"/>+        <Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>+        <DetectChar attribute="Command" char="`" context="#pop"/>+      </context>+      <context attribute="Regular Expression" lineEndContext="#stay" name="RegEx 1">+        <RegExpr String="\\\/" attribute="Regular Expression" context="#stay"/>+        <RegExpr String="#@{1,2}" attribute="Substitution" context="Short Subst"/>+        <Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>+        <RegExpr String="/[uiomxn]*" attribute="Regular Expression" context="#pop"/>+      </context>+      <!-- Substitutions can be nested -->+      <context attribute="Normal Text" lineEndContext="#stay" name="Subst">+        <DetectChar attribute="Substitution" char="}" context="#pop"/>+        <!-- Highlight substitution as code. -->+        <IncludeRules context="Normal"/>+      </context>+      <context attribute="Substitution" lineEndContext="#pop" name="Short Subst">+        <!-- Check for e.g.: "#@var#@@xy" -->+        <RegExpr String="#@{1,2}" attribute="Substitution" context="#stay"/>+        <RegExpr String="\w(?!\w)" attribute="Substitution" context="#pop"/>+      </context>+      <context attribute="Comment" lineEndContext="#pop" name="Comment Line">+      </context>+      <context attribute="Comment" lineEndContext="#pop" name="General Comment">+      </context>+      <!-- rules to be included in all regexpr contexts -->+      <context attribute="Regular Expression" lineEndContext="#stay" name="regexpr_rules">+        <Detect2Chars attribute="Regular Expression" char="\" char1="\" context="#stay"/>+        <RegExpr String="#@{1,2}" attribute="Substitution" context="Short Subst"/>+        <Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>+      </context>+      <context attribute="MarkdownCode" lineEndContext="#stay" name="Markdown Code">+        <RegExpr String="^\s*\`\`\`\s*$" attribute="MarkdownCode" context="#pop"/>+      </context>+    </contexts>+    <itemDatas>+      <itemData name="Global Constant" defStyleNum="dsDataType" color="#bb1188" bold="1"/>+      <itemData name="Constant" defStyleNum="dsDataType" color="#bb1188" bold="1"/>+      <itemData defStyleNum="dsNormal" name="Normal Text"/>+      <itemData defStyleNum="dsKeyword" name="Keyword"/>+      <itemData defStyleNum="dsOthers" name="Attribute Definition"/>+      <itemData color="#0000FF" defStyleNum="dsKeyword" name="Access Control"/>+      <itemData defStyleNum="dsKeyword" name="Definition"/>+      <itemData defStyleNum="dsKeyword" name="Mixin macros"/>+      <itemData defStyleNum="dsDecVal" name="Pseudo variable"/>+      <itemData defStyleNum="dsDecVal" name="Dec"/>+      <itemData defStyleNum="dsFloat" name="Float"/>+      <itemData defStyleNum="dsChar" name="Char"/>+      <itemData defStyleNum="dsBaseN" name="Octal"/>+      <itemData defStyleNum="dsBaseN" name="Hex"/>+      <itemData defStyleNum="dsBaseN" name="Bin"/>+      <itemData color="#D40000" defStyleNum="dsString" name="Symbol"/>+      <itemData defStyleNum="dsString" name="String"/>+      <itemData color="#DD4A4A" defStyleNum="dsString" name="Raw String" selColor="#DD4A4A"/>+      <itemData color="#AA3000" defStyleNum="dsString" name="Command"/>+      <itemData color="#4000A7" defStyleNum="dsNormal" name="Message"/>+      <itemData color="#4A5704" defStyleNum="dsOthers" name="Regular Expression"/>+      <itemData defStyleNum="dsOthers" name="Substitution"/>+      <itemData defStyleNum="dsNormal" name="Data"/>+      <itemData bold="1" defStyleNum="dsDataType" name="Default globals"/>+      <itemData defStyleNum="dsDataType" name="Global Variable"/>+      <itemData defStyleNum="dsDataType" name="Constant Value"/>+      <itemData defStyleNum="dsNormal" name="Member"/>+      <itemData defStyleNum="dsOthers" name="Attribute"/>+      <itemData defStyleNum="dsOthers" name="Class Variable"/>+      <itemData defStyleNum="dsComment" name="Comment"/>+      <itemData defStyleNum="dsComment" name="Blockcomment"/>+      <itemData defStyleNum="dsComment" name="DocComment"/>+      <itemData color="#0000ff" defStyleNum="dsNormal" name="Region Marker"/>+      <!-- use these to mark errors and alerts things -->+      <itemData defStyleNum="dsError" name="Error"/>+      <itemData color="#FF9FEC" defStyleNum="dsNormal" name="Delimiter"/>+      <itemData defStyleNum="dsOthers" name="Expression"/>+      <itemData color="#FF9FEC" defStyleNum="dsNormal" name="Operator"/>+      <itemData name="MarkdownHead" defStyleNum="dsFunction" bold="true"/>+      <itemData name="MarkdownBullet" defStyleNum="dsFunction"/>+      <itemData name="MarkdownNumlist" defStyleNum="dsFunction"/>+      <itemData name="MarkdownCode" defStyleNum="dsFunction"/>+    </itemDatas>+  </highlighting>+  <general>+    <comments>+      <comment name="singleLine" start="#"/>+    </comments>+    <keywords casesensitive="1" weakDeliminator="!?"/>+  </general>+</language>
+ xml/hamlet.xml view
@@ -0,0 +1,104 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE language SYSTEM "language.dtd"+[+  <!-- names must start with a letter, ideogram or underscore. \w matches any+  word character *or* a number, hence the lookahead -->+  <!ENTITY name    "(?![0-9])[\w_:][\w.:_-]*">+]>+<language name="Hamlet" version="0.1" kateversion="2.4" section="Markup" extensions="*.hamlet" author="Bastian Holst (bastianholst@gmx.de)" license="LGPL" indenter="haskell">+<highlighting>+<contexts>+  <context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >+    <RegExpr attribute="Element" context="element" String="&lt;&name;\b" />+    <!-- A widget -->+    <StringDetect attribute="Code" context="Code" String="^{"/>+    <!-- Something implementing ToHtml -->+    <StringDetect attribute="Code" context="Code" String="#{"/>+    <!-- An URL -->+    <StringDetect attribute="Code" context="Code" String="@{"/>+    <!-- A Message -->+    <StringDetect attribute="Code" context="Code" String="_{"/>+    <DetectChar attribute="Logic" context="Logic" firstNonSpace="true" char="$"/>+  </context>++  <context attribute="Element" lineEndContext="#stay" name="element" >+    <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" />+    <DetectChar attribute="Element" context="#pop" char="&gt;" />+    <RegExpr attribute="Attribute" context="Attribute" String="&name;" column="0"/>+    <RegExpr attribute="Attribute" context="Attribute" String="\s+&name;" />+    <RegExpr attribute="Class" context="#stay" String="\.&name;"/>+    <RegExpr attribute="Error" context="#stay" String="\S" />+  </context>++  <context name="Logic" lineEndContext="#pop" attribute="Normal Text">+    <WordDetect attribute="Logic" context="Codeline" String="if"/>+    <WordDetect attribute="Logic" context="Codeline" String="elseif"/>+    <WordDetect attribute="Logic" context="Assignment" String="forall"/>+    <WordDetect attribute="Logic" context="Assignment" String="maybe"/>+    <WordDetect attribute="Logic" context="#stay" String="else"/>+    <WordDetect attribute="Logic" context="#stay" String="nothing"/>+    <RegExpr attribute="Error" context="#stay" String="\S" />+  </context>++  <context name="Code" attribute="Normal Text" lineEndContext="#stay">+    <DetectChar attribute="Code" context="#pop" char="}"/>+    <IncludeRules context="##Haskell" />+  </context>++  <context name="Codeline" attribute="Normal Text" lineEndContext="#pop">+    <IncludeRules context="##Haskell" />+  </context>++  <context name="Assignment" attribute="Normal Text" lineEndContext="#pop">+    <StringDetect attribute="Assignment" context="Codeline" String="&lt;-"/>+    <IncludeRules context="##Haskell" />+  </context>++  <context name="Attribute" attribute="Other Text" lineEndContext="#stay">+    <DetectChar attribute="Attribute" context="Value" char="=" />+    <DetectChar attribute="Element" context="#pop#pop" char="&gt;"/>+    <RegExpr attribute="Error" context="#stay" String="\S" />+  </context>++  <context attribute="Value" lineEndContext="#stay" name="Value">+    <DetectChar attribute="Value" context="Value DQ" char="&quot;" />+    <DetectChar attribute="Value" context="Value SQ" char="&apos;" />+    <StringDetect attribute="Code" context="Value Code" String="@{"/>+    <StringDetect attribute="Code" context="Value Code" String="#{"/>+    <RegExpr attribute="Value" context="#pop#pop" String="[^&quot;&apos;&gt;\s]+"/>+    <RegExpr attribute="Error" context="#stay" String="\S" />+  </context>++  <context name="Value DQ" attribute="Value" lineEndContext="#stay">+    <DetectChar attribute="Value" context="#pop#pop#pop" char="&quot;" />+  </context>++  <context name="Value SQ" attribute="Value" lineEndContext="#stay">+    <DetectChar attribute="Value" context="#pop#pop#pop" char="&apos;" />+  </context>+  +  <context name="Value Code" attribute="Normal Text" lineEndContext="#stay">+    <DetectChar attribute="Code" context="#pop#pop#pop" char="}"/>+    <IncludeRules context="##Haskell" />+  </context>++</contexts>+<itemDatas>+  <itemData name="Normal Text" defStyleNum="dsNormal" />+  <itemData name="Element" defStyleNum="dsKeyword" />+  <itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />+  <itemData name="Class" defStyleNum="dsString" color="#a00" spellChecking="false" />+  <itemData name="Value" defStyleNum="dsString" color="#a00" spellChecking="false" />+  <itemData name="Logic" defStyleNum="dsKeyword" spellChecking="false" />+  <itemData name="Code"  defStyleNum="dsKeyword" spellChecking="false" />+  <itemData name="Error" defStyleNum="dsError" spellChecking="false" />+  <itemData name="Assignment" defStyleNum="dsOthers"  spellChecking="false" />+</itemDatas>+</highlighting> +<general>+  <comments>+    <comment name="singleLine" start="#"/>+  </comments>+  <keywords casesensitive="1"/>+</general> +</language>