summary refs log tree commit diff stats
path: root/tests/compile/tlexer.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compile/tlexer.nim')
-rw-r--r--tests/compile/tlexer.nim60
1 files changed, 0 insertions, 60 deletions
diff --git a/tests/compile/tlexer.nim b/tests/compile/tlexer.nim
deleted file mode 100644
index 10a8ab51d..000000000
--- a/tests/compile/tlexer.nim
+++ /dev/null
@@ -1,60 +0,0 @@
-discard """

-  disabled: true

-"""

-

-# We start with a comment

-# This is the same comment

-

-# This is a new one!

-

-import

-  lexbase, os, strutils

-

-type

-  TMyRec {.final.} = object

-    x, y: int     # coordinates

-    c: char       # a character

-    a: int32      # an integer

-

-  PMyRec = ref TMyRec # a reference to `TMyRec`

-

-proc splitText(txt: string): seq[string] # splits a text into several lines

-                                         # the comment continues here

-                                         # this is not easy to parse!

-

-proc anotherSplit(txt: string): seq[string] =

-  # the comment should belong to `anotherSplit`!

-  # another problem: comments are statements!

-

-const

-  x = 0B0_10001110100_0000101001000111101011101111111011000101001101001001'f64 # x ~~ 1.72826e35

-  myNan = 0B01111111100000101100000000001000'f32 # NAN

-  y = """

-    a rather long text.

-    Over many

-    lines.

-  """

-  s = "\xff"

-  a = {0..234}

-  b = {0..high(int)}

-  v = 0'i32

-  z = 6767566'f32

-

-# small test program for lexbase

-

-proc main*(infile: string, a, b: int, someverylongnamewithtype = 0,

-           anotherlongthingie = 3) =

-  var

-    myInt: int = 0

-    s: seq[string]

-  # this should be an error!

-  if initBaseLexer(L, infile, 30): nil

-  else:

-    writeln(stdout, "could not open: " & infile)

-  writeln(stdout, "Success!")

-  call(3, # we use 3

-       12, # we use 12

-       43) # we use 43

-       

-

-main(ParamStr(1), 9, 0)

800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
package msg

import (
	"git.sr.ht/~sircmpwn/aerc/commands"
)

var (
	MessageCommands *commands.Commands
)

func register(cmd commands.Command) {
	if MessageCommands == nil {
		MessageCommands = commands.NewCommands()
	}
	MessageCommands.Register(cmd)
}