mirror of
https://github.com/anoma/juvix.git
synced 2025-01-05 22:46:08 +03:00
Add pragma face (#2312)
This pr assigns pragmas their own face, as opposed to the same face as regular comments.
This commit is contained in:
parent
3a1c519939
commit
15574caf02
@ -58,6 +58,7 @@ goFaceParsedItem i = WithLoc (i ^. parsedLoc) (PropertyFace f)
|
||||
ParsedTagLiteralInt -> FaceNumber
|
||||
ParsedTagLiteralString -> FaceString
|
||||
ParsedTagComment -> FaceComment
|
||||
ParsedTagPragma -> FacePragma
|
||||
ParsedTagJudoc -> FaceJudoc
|
||||
ParsedTagDelimiter -> FaceDelimiter
|
||||
|
||||
|
@ -32,6 +32,7 @@ data Face
|
||||
| FaceString
|
||||
| FaceNumber
|
||||
| FaceComment
|
||||
| FacePragma
|
||||
| FaceJudoc
|
||||
| FaceError
|
||||
|
||||
@ -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
|
||||
|
@ -57,7 +57,7 @@ registerPragmas i =
|
||||
registerItem
|
||||
ParsedItem
|
||||
{ _parsedLoc = i,
|
||||
_parsedTag = ParsedTagComment
|
||||
_parsedTag = ParsedTagPragma
|
||||
}
|
||||
|
||||
registerLiteral :: (Member InfoTableBuilder r) => LiteralLoc -> Sem r LiteralLoc
|
||||
|
@ -13,6 +13,7 @@ data ParsedItemTag
|
||||
| ParsedTagLiteralInt
|
||||
| ParsedTagLiteralString
|
||||
| ParsedTagComment
|
||||
| ParsedTagPragma
|
||||
| ParsedTagJudoc
|
||||
| ParsedTagDelimiter
|
||||
deriving stock (Eq, Show, Generic)
|
||||
|
@ -59,6 +59,9 @@ include = "include"
|
||||
alias :: (IsString s) => s
|
||||
alias = "alias"
|
||||
|
||||
pragma :: (IsString s) => s
|
||||
pragma = "pragma"
|
||||
|
||||
import_ :: (IsString s) => s
|
||||
import_ = "import"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user