Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pragma face #2312

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions src/Juvix/Compiler/Concrete/Data/Highlight.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ goFaceParsedItem i = WithLoc (i ^. parsedLoc) (PropertyFace f)
ParsedTagLiteralInt -> FaceNumber
ParsedTagLiteralString -> FaceString
ParsedTagComment -> FaceComment
ParsedTagPragma -> FacePragma
ParsedTagJudoc -> FaceJudoc
ParsedTagDelimiter -> FaceDelimiter

Expand Down
2 changes: 2 additions & 0 deletions src/Juvix/Compiler/Concrete/Data/Highlight/Properties.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ data Face
| FaceString
| FaceNumber
| FaceComment
| FacePragma
| FaceJudoc
| FaceError

Expand All @@ -40,6 +41,7 @@ faceSymbolStr = \case
FaceAxiom -> Str.axiom
FaceInductive -> Str.inductive
FaceConstructor -> Str.constructor
FacePragma -> Str.pragma
FaceModule -> Str.module_
FaceKeyword -> Str.keyword
FaceDelimiter -> Str.delimiter
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Concrete/Data/ParsedInfoTableBuilder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ registerPragmas i =
registerItem
ParsedItem
{ _parsedLoc = i,
_parsedTag = ParsedTagComment
_parsedTag = ParsedTagPragma
}

registerLiteral :: (Member InfoTableBuilder r) => LiteralLoc -> Sem r LiteralLoc
Expand Down
1 change: 1 addition & 0 deletions src/Juvix/Compiler/Concrete/Data/ParsedItem.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ data ParsedItemTag
| ParsedTagLiteralInt
| ParsedTagLiteralString
| ParsedTagComment
| ParsedTagPragma
| ParsedTagJudoc
| ParsedTagDelimiter
deriving stock (Eq, Show, Generic)
Expand Down
3 changes: 3 additions & 0 deletions src/Juvix/Extra/Strings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ include = "include"
alias :: (IsString s) => s
alias = "alias"

pragma :: (IsString s) => s
pragma = "pragma"

import_ :: (IsString s) => s
import_ = "import"

Expand Down