Skip to content

Instantly share code, notes, and snippets.

@ashgti
Last active August 29, 2015 14:16
Show Gist options
  • Save ashgti/b9f21f21bbcc63e4cf9d to your computer and use it in GitHub Desktop.
Save ashgti/b9f21f21bbcc63e4cf9d to your computer and use it in GitHub Desktop.
Syntax highlight example
<!DOCTYPE html>
<html>
<head>
<title>syntax-check.pl6</title>
<style media="screen">
#atom-text-editor,
:host {
background-color: #002b36;
color: #839496;
}
atom-text-editor .invisible-character,
:host .invisible-character {
color: rgba(101, 123, 131, 0.2);
}
atom-text-editor .indent-guide,
:host .indent-guide {
color: rgba(101, 123, 131, 0.2);
}
atom-text-editor .gutter,
:host .gutter {
background-color: #073642;
color: #839496;
}
atom-text-editor .gutter .line-number,
:host .gutter .line-number {
opacity: 1;
}
atom-text-editor .gutter .line-number.folded,
:host .gutter .line-number.folded,
atom-text-editor .gutter .line-number:after,
:host .gutter .line-number:after,
atom-text-editor .fold-marker:after,
:host .fold-marker:after {
color: #d33682;
}
atom-text-editor .cursor,
:host .cursor {
border-color: #fdf6e3;
}
atom-text-editor .selection .region,
:host .selection .region {
background-color: #073a47;
}
atom-text-editor .line-number.cursor-line-no-selection,
:host .line-number.cursor-line-no-selection {
background-color: #0a4d5e;
}
.bracket-matcher .region {
background-color: rgba(88, 110, 117, 0.8);
opacity: 0.3;
}
.comment {
color: #586e75;
font-style: italic;
}
.entity {
color: #839496;
}
.entity .punctuation {
color: #dc322f;
}
.entity.name {
color: #cb4b16;
}
.entity.name.tag {
color: #268bd2;
}
.entity.constant {
color: #dc322f;
}
.entity.attribute-name {
color: #586e75;
}
.keyword {
color: #859900;
}
.keyword.other.special-method {
color: #cb4b16;
}
.storage.type {
color: #268bd2;
}
.storage.class.type {
color: #d33682;
}
.storage.modifier {
color: #268bd2;
}
.constant {
color: #b58900;
}
.constant.numeric,
.constant.boolean,
.constant.symbol,
.constant.symbol .punctuation {
color: #2aa198;
}
.constant.symbol.hashkey {
color: #dc322f;
}
.constant.symbol.hashkey .punctuation {
color: #dc322f;
}
.delimiter,
.brace {
color: #268bd2;
}
.delimiter,
.round {
color: #859900;
}
.delimiter.period {
color: #859900;
}
.invalid.deprecated {
text-decoration: underline;
color: #dc322f;
}
.invalid.illegal {
color: #dc322f;
}
.method .name {
color: #268bd2;
}
.operator.assignment {
color: #93a1a1;
}
.parameter {
color: #dc322f;
}
.property-name {
color: #859900;
}
.property-value .unit {
color: #839496;
}
.string {
color: #2aa198;
}
.string .constant.character.escape {
color: #dc322f;
font-weight: bold;
}
.string .punctuation.string {
color: #2aa198;
}
.string.regexp {
color: #2aa198;
}
.string.regexp .string.regexp.arbitrary-repetition {
color: #2aa198;
}
.variable {
color: #2aa198;
}
.variable.instance {
color: #268bd2;
}
.variable.constant {
color: #586e75;
}
.variable.parameter {
color: #dc322f;
}
.support {
color: #cb4b16;
}
.support.class {
color: #dc322f;
}
.terminator {
color: #859900;
}
.source.c .meta.preprocessor,
.source.c\+\+ .meta.preprocessor {
color: #dc322f;
}
.source.c .keyword.control.import,
.source.c\+\+ .keyword.control.import {
color: #dc322f;
}
.source.c .punctuation.string,
.source.c\+\+ .punctuation.string {
color: #2aa198;
}
.source.c .constant,
.source.c\+\+ .constant {
color: #dc322f;
}
.source.c .constant.numeric,
.source.c\+\+ .constant.numeric,
.source.c .constant.language.c,
.source.c\+\+ .constant.language.c {
color: #2aa198;
}
.source.c .storage,
.source.c\+\+ .storage {
color: #b58900;
}
.source.c .entity,
.source.c\+\+ .entity {
color: #839496;
}
.source.c .entity.name.function.preprocessor,
.source.c\+\+ .entity.name.function.preprocessor {
color: #dc322f;
}
.source.c .support.type,
.source.c\+\+ .support.type {
color: #b58900;
}
.source.c .support.type.posix-reserved,
.source.c\+\+ .support.type.posix-reserved {
color: #839496;
}
.source.c .variable.other.dot-access,
.source.c\+\+ .variable.other.dot-access {
color: #839496;
}
.source.c .variable.parameter.preprocessor,
.source.c\+\+ .variable.parameter.preprocessor {
color: #dc322f;
}
.source.css .entity.name {
color: #859900;
}
.source.css .punctuation.section {
color: #268bd2;
}
.source.css .punctuation.separator {
color: #839496;
}
.source.css .punctuation.terminator {
color: #839496;
}
.source.css .punctuation.definition.entity {
color: #268bd2;
}
.source.css .punctuation.definition.constant {
color: #839496;
}
.source.css .brace {
color: #268bd2;
}
.source.css .variable {
color: #268bd2;
}
.source.css .attribute-name.class {
color: #268bd2;
}
.source.css .property-name {
color: #b58900;
}
.source.css .property-value {
color: #2aa198;
}
.source.css .unit {
color: #2aa198;
}
.source.css .support.function {
color: #268bd2;
}
.source.css .rgb-value {
color: #2aa198;
}
.source.css .id {
color: #268bd2;
}
.source.css .pseudo-element {
color: #cb4b16;
}
.source.css .pseudo-class {
color: #cb4b16;
}
.source.css .pseudo-class.attribute-name {
color: #cb4b16;
}
atom-text-editor .gutter .git-line-modified,
:host .gutter .git-line-modified {
border-left: 2px solid #b58900;
padding-left: calc(0.5em - 2px);
color: #839496;
}
atom-text-editor .gutter .git-line-added,
:host .gutter .git-line-added {
border-left: 2px solid #859900;
padding-left: calc(0.5em - 2px);
color: #839496;
}
atom-text-editor .gutter .git-line-removed,
:host .gutter .git-line-removed {
border-left: 2px solid #dc322f;
padding-left: calc(0.5em - 2px);
color: #839496;
}
.source.js .constant {
color: #859900;
}
.source.js .comma {
color: #839496;
}
.source.js .support.class {
color: #859900;
}
.source.js .entity.name.type {
color: #b58900;
}
.source.js .entity.name {
color: #839496;
}
.source.js .meta.brace {
color: #839496;
}
.source.js .keyword {
color: #839496;
}
.source.js .keyword.operator.new {
color: #859900;
}
.source.js .keyword.control {
color: #859900;
}
.source.js .keyword.control.regexp {
color: #2aa198;
}
.source.js .variable {
color: #268bd2;
}
.source.js .variable.parameter {
color: #839496;
}
.source.js .regexp {
color: #2aa198;
}
.source.js .support.function {
color: #839496;
}
.source.js .support.constant {
color: #839496;
}
.source.js .constant.numeric {
color: #839496;
}
.source.js .punctuation.terminator.statement {
color: #839496;
}
.source.js .meta.delimiter.method.period {
color: #839496;
}
.source.js .meta.brace.square {
color: #268bd2;
}
.source.js .meta.brace.curly {
color: #268bd2;
}
atom-text-editor .gutter .line-number.linter-warning .icon-right:before,
:host .gutter .line-number.linter-warning .icon-right:before {
color: #b58900;
}
atom-text-editor .gutter .line-number.linter-error .icon-right:before,
:host .gutter .line-number.linter-error .icon-right:before {
color: #dc322f;
}
atom-text-editor .highlights .linter-warning .region,
:host .highlights .linter-warning .region {
border: 1px solid #b58900;
background-image: none;
background-color: rgba(181, 137, 0, 0.2);
}
atom-text-editor .highlights .linter-error .region,
:host .highlights .linter-error .region {
border: 1px solid #dc322f;
background-image: none;
background-color: rgba(255, 16, 12, 0.2);
}
atom-text-editor .gfm .markup.italic,
:host .gfm .markup.italic {
font-style: italic;
}
atom-text-editor .gfm .markup.bold,
:host .gfm .markup.bold {
font-weight: bold;
}
atom-text-editor .gfm .markup.heading,
:host .gfm .markup.heading {
color: #cb4b16;
}
atom-text-editor .gfm .link,
:host .gfm .link {
color: #2aa198;
}
atom-text-editor .gfm .link .entity,
:host .gfm .link .entity {
color: #6c71c4;
}
atom-text-editor .gfm .raw,
:host .gfm .raw {
font-style: italic;
}
atom-text-editor .gfm.support,
:host .gfm.support {
color: #dc322f;
}
.source.php .storage.type.class {
color: #b58900;
}
.source.php .storage.type.function {
color: #dc322f;
}
.source.php .storage.modifier {
color: #b58900;
}
.source.php .entity.name.type.class {
color: #839496;
}
.source.php .entity.name.function {
color: #839496;
}
.source.php .entity.other {
color: #839496;
}
.source.php .variable {
color: #268bd2;
}
.source.php .punctuation.definition {
color: #839496;
}
.source.php .punctuation.definition.comment {
color: #586e75;
}
.source.php .punctuation.definition.array {
color: #dc322f;
}
.source.php .punctuation.definition.string {
color: #839496;
}
.source.php .punctuation.definition.variable {
color: #859900;
}
.source.php .punctuation.section.scope {
color: #dc322f;
}
.source.php .support.function.construct {
color: #b58900;
}
.source.php .support.function.array {
color: #859900;
}
.source.php .keyword.operator.class {
color: #b58900;
}
.source.php .keyword.operator.assignment {
color: #859900;
}
.source.php .keyword.other {
color: #dc322f;
}
.source.python .entity {
color: #839496;
}
.source.python .entity.name {
color: #268bd2;
}
.source.python .entity.other {
color: #268bd2;
}
.source.python .function {
color: #268bd2;
}
.source.python .function.magic {
color: #268bd2;
}
.source.python .punctuation.string {
color: #2aa198;
}
.source.python .keyword.operator {
color: #839496;
}
.source.python .keyword.operator.quantifier {
color: #2aa198;
}
.source.python .keyword.operator.logical {
color: #859900;
}
.source.python .keyword.control.import {
color: #cb4b16;
}
.source.python .keyword.other {
color: #859900;
}
.source.python .constant.language {
color: #268bd2;
}
.source.python .constant.character {
color: #2aa198;
}
.source.python .constant.other {
color: #dc322f;
}
.source.python .entity.name.type.class {
color: #268bd2;
}
.source.python .variable {
color: #839496;
}
.source.python .support.function.builtin {
color: #268bd2;
}
.source.python .support.type.exception.python {
color: #b58900;
}
.source.python .support.type.python {
color: #268bd2;
}
.source.python .storage.type.string {
color: #2aa198;
}
.source.python .storage.type.class {
color: #859900;
}
.source.python .storage.type.class.todo {
color: #d33682;
}
.source.python .storage.type.function {
color: #859900;
}
.source.python .punctuation.definition.parameters {
color: #839496;
}
.source.python .punctuation.section.function.begin {
color: #839496;
}
.source.python .punctuation.separator.parameters {
color: #839496;
}
.source.ruby .meta.embedded .punctuation.section {
color: #dc322f;
}
.source.ruby .punctuation.definition {
color: #839496;
}
.source.ruby .punctuation.definition.string {
color: #dc322f;
}
.source.ruby .punctuation.definition.comment {
color: #586e75;
}
.source.ruby .entity.inherited-class {
color: #b58900;
}
.source.ruby .variable.parameter {
color: #839496;
}
.source.ruby .variable.constant {
color: #b58900;
}
.source.ruby .instance .punctuation.definition {
color: #268bd2;
}
.source.ruby .class {
color: #b58900;
}
.source.ruby .class.control {
color: #839496;
}
.source.ruby .module {
color: #b58900;
}
.source.ruby .require .keyword.other.special-method {
color: #cb4b16;
}
.source.ruby .keyword.other.special-method {
color: #cb4b16;
}
.source.ruby .keyword.other {
color: #859900;
}
.source.ruby .keyword.control {
color: #859900;
}
.source.ruby .special-method {
color: #268bd2;
}
.source.ruby .symbol {
color: #2aa198;
}
.source.ruby .symbol .punctuation.definition {
color: #2aa198;
}
.source.ruby .hashkey {
color: #dc322f;
}
.source.ruby .hashkey .punctuation.definition {
color: #dc322f;
}
.source.ruby .string.regexp {
color: #dc322f;
}
.source.ruby .todo {
color: #d33682;
}
.source.ruby .variable.ruby.global {
color: #268bd2;
}
.source.ruby .variable.ruby.global .punctuation {
color: #268bd2;
}
.source.ruby .variable.block {
color: #268bd2;
}
.source.ruby .punctuation.separator {
color: #839496;
}
.source.ruby .string.interpolated .embedded.line.ruby .punctuation .source.ruby {
color: #dc322f;
}
.source.ruby .string.interpolated .embedded.line.ruby .source.ruby {
color: #839496;
}
.source.ruby .string.interpolated .embedded.line.ruby .source.ruby .punctuation.array,
.source.ruby .string.interpolated .embedded.line.ruby .source.ruby .punctuation.function {
color: #839496;
}
.source.ruby .support.function {
color: #839496;
}
.source.ruby .support.function.kernel {
color: #859900;
}
.source.scala .variable {
color: #93a1a1;
}
.source.scala .declaration {
color: #93a1a1;
font-weight: bold;
}
.source.scala .comparison {
color: #93a1a1;
}
.source.scala .class,
.source.scala .type {
color: #b58900;
}
.source.scala .val {
font-weight: normal;
}
.source.scala .variable {
font-weight: bold;
}
.source.scala .variable.parameter {
color: #6c71c4;
font-weight: normal;
}
.source.scala .control.flow {
color: #93a1a1;
font-weight: bold;
}
.source.scala .constant.language {
color: #93a1a1;
font-weight: bold;
}
.source.scala .function.declaration {
color: #6c71c4;
}
.source.scala .modifier.other {
font-weight: bold;
}
.source.scala .package {
color: #93a1a1;
}
.source.scala .variable.import {
font-weight: normal;
}
.source.scala .type .bounds,
.source.scala .type .class {
color: #6c71c4;
}
.source.scala .documentation :not(.embedded).link.entity {
color: #268bd2;
text-decoration: underline;
}
.source.scala .documentation :not(.embedded) .class,
.source.scala .documentation :not(.embedded) .parameter {
color: #93a1a1;
}
.source.scala .documentation :not(.embedded) .description {
color: #586e75;
}
.source.scala .embedded {
color: #93a1a1;
opacity: 0.8;
font-style: italic;
}
.source.scala .embedded .margin,
.source.scala .embedded .delimiters {
font-style: normal;
}
.terminal {
background-color: #002b36;
}
.terminal .color-0 {
color: #839496;
}
.terminal .background-0 {
background-color: #002b36;
}
.terminal .color-1 {
color: #dc322f;
}
.terminal .background-1 {
background-color: #dc322f;
}
.terminal .color-2 {
color: #859900;
}
.terminal .background-2 {
background-color: #859900;
}
.terminal .color-3 {
color: #b58900;
}
.terminal .background-3 {
background-color: #b58900;
}
.terminal .color-4 {
color: #268bd2;
}
.terminal .background-4 {
background-color: #268bd2;
}
.terminal .color-5 {
color: #d33682;
}
.terminal .background-5 {
background-color: #d33682;
}
.terminal .color-6 {
color: #2aa198;
}
.terminal .background-6 {
background-color: #2aa198;
}
.terminal .color-7 {
color: #fdf6e3;
}
.terminal .background-7 {
background-color: #fdf6e3;
}
atom-text-editor .wrap-guide,
:host .wrap-guide {
background-color: #073642;
}
</style>
</head>
<body>
<h1>Syntax Example for: <strong>syntax-check.pl6</strong>
<div id="atom-text-editor">
<pre class="editor editor-colors"><div class="line"><span class="source perl6"><span class="comment line number-sign perl6"><span>#!/usr/bin/env&nbsp;perl6</span></span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span class="keyword other include perl6"><span>use</span></span><span>&nbsp;v6;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span class="storage type declare routine perl6"><span>sub</span></span><span>&nbsp;check-dependencies&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;</span><span class="keyword control conditional perl6"><span>if</span></span><span>&nbsp;qx/highlights&nbsp;-v/.</span><span class="support function"><span>chomp</span></span><span>&nbsp;~~&nbsp;</span><span class="string quoted single perl6"><span class="punctuation definition string begin perl6"><span>&#39;</span></span><span class="punctuation definition string end perl6"><span>&#39;</span></span></span><span>&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control control-handlers perl6"><span>die</span></span><span>&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>System&nbsp;command&nbsp;&#39;highlights&#39;&nbsp;missing,&nbsp;please&nbsp;install&nbsp;(e.g.&nbsp;&#39;npm&nbsp;</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>&nbsp;+</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>install&nbsp;highlights&#39;)</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;}</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;</span><span class="keyword control conditional perl6"><span>if</span></span><span>&nbsp;qx/apm&nbsp;-v/.</span><span class="support function"><span>chomp</span></span><span>&nbsp;~~&nbsp;</span><span class="string quoted single perl6"><span class="punctuation definition string begin perl6"><span>&#39;</span></span><span class="punctuation definition string end perl6"><span>&#39;</span></span></span><span>&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control control-handlers perl6"><span>die</span></span><span>&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>System&nbsp;command&nbsp;&#39;apm&#39;&nbsp;missing,&nbsp;please&nbsp;install&nbsp;from&nbsp;</span><span class="markup underline link https hyperlink"><span>https://atom.io/</span></span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>&nbsp;+</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>&nbsp;and&nbsp;install&nbsp;the&nbsp;&#39;apm&#39;&nbsp;system&nbsp;command.</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;}</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;</span><span class="keyword control conditional perl6"><span>if</span></span><span>&nbsp;qx/lessc&nbsp;-v/.</span><span class="support function"><span>chomp</span></span><span>&nbsp;~~&nbsp;</span><span class="string quoted single perl6"><span class="punctuation definition string begin perl6"><span>&#39;</span></span><span class="punctuation definition string end perl6"><span>&#39;</span></span></span><span>&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control control-handlers perl6"><span>die</span></span><span>&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>npm&nbsp;install&nbsp;-g&nbsp;less</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;}</span></span></div><div class="line"><span class="source perl6"><span>}</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span class="storage type variable perl6"><span>my</span></span><span>&nbsp;</span><span class="variable other basic perl6"><span>$syntax-validation-template</span></span><span>&nbsp;=&nbsp;q:</span><span class="support function"><span>to</span></span><span>/</span><span class="meta function perl6"><span>END</span></span><span>/;</span></span></div><div class="line"><span class="source perl6"><span>&lt;!DOCTYPE&nbsp;html&gt;</span></span></div><div class="line"><span class="source perl6"><span>&lt;html&gt;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&lt;head&gt;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;%1</span><span class="variable other perl6"><span>$s</span></span><span>&lt;/title&gt;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="support function"><span>link</span></span><span>&nbsp;rel=</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>stylesheet</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>&nbsp;type=</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>text/css</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>&nbsp;href=</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>./%2$s.css</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>&nbsp;/&gt;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&lt;/head&gt;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&lt;</span><span class="support function"><span>body</span></span><span>&gt;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Syntax&nbsp;Example&nbsp;</span><span class="keyword control repeat perl6"><span>for</span></span><span>:&nbsp;&lt;strong&gt;%1</span><span class="variable other perl6"><span>$s</span></span><span>&lt;/strong&gt;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;%3</span><span class="variable other perl6"><span>$s</span></span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&lt;/</span><span class="support function"><span>body</span></span><span>&gt;</span></span></div><div class="line"><span class="source perl6"><span>&lt;/html&gt;</span></span></div><div class="line"><span class="source perl6"><span class="meta function perl6"><span>END</span></span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span class="storage type declare routine perl6"><span>sub</span></span><span>&nbsp;MAIN(:i(:</span><span class="variable other basic perl6"><span>$init</span></span><span>),&nbsp;:t(:</span><span class="variable other basic perl6"><span>$theme</span></span><span>)&nbsp;=&nbsp;</span><span class="string quoted single perl6"><span class="punctuation definition string begin perl6"><span>&#39;</span></span><span>atom-light-syntax</span><span class="punctuation definition string end perl6"><span>&#39;</span></span></span><span>,&nbsp;:o(:</span><span class="variable other basic perl6"><span>$output</span></span><span>)&nbsp;=&nbsp;</span><span class="string quoted single perl6"><span class="punctuation definition string begin perl6"><span>&#39;</span></span><span>output</span><span class="punctuation definition string end perl6"><span>&#39;</span></span></span><span>,&nbsp;*</span><span class="variable other basic perl6"><span>@example-files</span></span><span>)&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;check-dependencies;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;</span><span class="keyword control conditional perl6"><span>if</span></span><span>&nbsp;</span><span class="variable other basic perl6"><span>$init</span></span><span>&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;qx&lt;apm&nbsp;init&nbsp;--</span><span class="keyword other module perl6"><span>package</span></span><span>&nbsp;language-</span><span class="support function"><span>perl</span></span><span>&nbsp;--convert&nbsp;./</span><span class="support function"><span>perl</span></span><span>.tmbundle&gt;;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;qx&lt;npm&nbsp;install&nbsp;./language-</span><span class="support function"><span>perl</span></span><span>&gt;;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;}</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;</span><span class="keyword control conditional perl6"><span>if</span></span><span>&nbsp;</span><span class="variable other basic perl6"><span>$output</span></span><span>.</span><span class="support type perl6"><span>IO</span></span><span>&nbsp;!~~&nbsp;:d&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;mkdir(</span><span class="variable other basic perl6"><span>$output</span></span><span>);</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;}</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;</span><span class="support function"><span>shell</span></span><span>(qqw{lessc&nbsp;--include-path=</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>themes/$theme/styles</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>themes/$theme/index.less</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>$output/$theme.css</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>});</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;</span><span class="keyword control repeat perl6"><span>for</span></span><span>&nbsp;</span><span class="variable other basic perl6"><span>@example-files</span></span><span>&nbsp;-&gt;&nbsp;</span><span class="variable other basic perl6"><span>$example</span></span><span>&nbsp;{</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type variable perl6"><span>my</span></span><span>&nbsp;</span><span class="variable other basic perl6"><span>$highlight</span></span><span>&nbsp;=&nbsp;qqx&lt;node&nbsp;./highlight-p6.js&nbsp;--scope&nbsp;source.perl6&nbsp;{</span><span class="variable other basic perl6"><span>$example</span></span><span>}&gt;;</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="support function"><span>spurt</span></span><span>&nbsp;</span><span class="string quoted double perl6"><span class="punctuation definition string begin perl6"><span>&quot;</span></span><span>$output/$example.html</span><span class="punctuation definition string end perl6"><span>&quot;</span></span></span><span>,&nbsp;</span><span class="support function"><span>sprintf</span></span><span>(</span><span class="variable other basic perl6"><span>$syntax-validation-template</span></span><span>,&nbsp;</span><span class="variable other basic perl6"><span>$example</span></span><span>,&nbsp;</span><span class="variable other basic perl6"><span>$theme</span></span><span>,&nbsp;</span><span class="variable other basic perl6"><span>$highlight</span></span><span>);</span></span></div><div class="line"><span class="source perl6"><span>&nbsp;&nbsp;}</span></span></div><div class="line"><span class="source perl6"><span>}</span></span></div></pre>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment