diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
commit | 1dd3124a9770e11b6684e5dd1e6bc15a0aa3bc67 (patch) | |
tree | 87a171383266dd1f64196589af081bc2f8e497c3 /tests/examplefiles/example.clay | |
parent | f1c080e184dc1bbc36eaa7cd729ff3a499de568a (diff) | |
download | pygments-master.tar.gz |
Diffstat (limited to 'tests/examplefiles/example.clay')
-rw-r--r-- | tests/examplefiles/example.clay | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/examplefiles/example.clay b/tests/examplefiles/example.clay deleted file mode 100644 index 784752c6..00000000 --- a/tests/examplefiles/example.clay +++ /dev/null @@ -1,33 +0,0 @@ - -/// @section StringLiteralRef - -record StringLiteralRef ( - sizep : Pointer[SizeT], -); - - -/// @section predicates - -overload ContiguousSequence?(#StringLiteralRef) : Bool = true; -[s when StringLiteral?(s)] -overload ContiguousSequence?(#Static[s]) : Bool = true; - - - -/// @section size, begin, end, index - -forceinline overload size(a:StringLiteralRef) = a.sizep^; - -forceinline overload begin(a:StringLiteralRef) : Pointer[Char] = Pointer[Char](a.sizep + 1); -forceinline overload end(a:StringLiteralRef) = begin(a) + size(a); - -[I when Integer?(I)] -forceinline overload index(a:StringLiteralRef, i:I) : ByRef[Char] { - assert["boundsChecks"](i >= 0 and i < size(a), "StringLiteralRef index out of bounds"); - return ref (begin(a) + i)^; -} - -foo() = """ -long\tlong -story -""" |