Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Compiler/lex.fsl
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,12 @@ and tripleQuoteString (sargs: LexerStringArgs) (skip: bool) = parse
let cont = LexCont.Token(args.ifdefStack, args.stringNest)
fin.Finish buf kind LexerStringFinisherContext.TripleQuote cont }

| '"' '"' '"' 'B'
{ let (buf, fin, _m, kind, args) = sargs
args.interpolationDelimiterLength <- 0
let cont = LexCont.Token(args.ifdefStack, args.stringNest)
fin.Finish buf { kind with IsByteString = true } LexerStringFinisherContext.TripleQuote cont }

| newline
{ let (buf, _fin, m, kind, args) = sargs
incrLine lexbuf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ module ``Basic Grammar Element Constants`` =

[<Fact>]
let ``Basic constants compile `` () =
let tripleQuotedByteString = " \"\"\" \" \"\"\"B "

CompilerAssert.Pass
"""
$"""
let sbyteConst = 1y
let int16Const = 1us
let int32Const = 1ul
Expand Down Expand Up @@ -42,6 +44,8 @@ let charConst = '1'
let stringConst = "1"
let bytestringConst = "1"B
let byteTripleQuotedStringConst = {tripleQuotedByteString}
let bytecharConst = '1'B
Expand Down
Loading