mirror of
https://github.com/anoma/juvix.git
synced 2025-01-08 08:39:26 +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
|
ParsedTagLiteralInt -> FaceNumber
|
||||||
ParsedTagLiteralString -> FaceString
|
ParsedTagLiteralString -> FaceString
|
||||||
ParsedTagComment -> FaceComment
|
ParsedTagComment -> FaceComment
|
||||||
|
ParsedTagPragma -> FacePragma
|
||||||
ParsedTagJudoc -> FaceJudoc
|
ParsedTagJudoc -> FaceJudoc
|
||||||
ParsedTagDelimiter -> FaceDelimiter
|
ParsedTagDelimiter -> FaceDelimiter
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ data Face
|
|||||||
| FaceString
|
| FaceString
|
||||||
| FaceNumber
|
| FaceNumber
|
||||||
| FaceComment
|
| FaceComment
|
||||||
|
| FacePragma
|
||||||
| FaceJudoc
|
| FaceJudoc
|
||||||
| FaceError
|
| FaceError
|
||||||
|
|
||||||
@ -40,6 +41,7 @@ faceSymbolStr = \case
|
|||||||
FaceAxiom -> Str.axiom
|
FaceAxiom -> Str.axiom
|
||||||
FaceInductive -> Str.inductive
|
FaceInductive -> Str.inductive
|
||||||
FaceConstructor -> Str.constructor
|
FaceConstructor -> Str.constructor
|
||||||
|
FacePragma -> Str.pragma
|
||||||
FaceModule -> Str.module_
|
FaceModule -> Str.module_
|
||||||
FaceKeyword -> Str.keyword
|
FaceKeyword -> Str.keyword
|
||||||
FaceDelimiter -> Str.delimiter
|
FaceDelimiter -> Str.delimiter
|
||||||
|
@ -57,7 +57,7 @@ registerPragmas i =
|
|||||||
registerItem
|
registerItem
|
||||||
ParsedItem
|
ParsedItem
|
||||||
{ _parsedLoc = i,
|
{ _parsedLoc = i,
|
||||||
_parsedTag = ParsedTagComment
|
_parsedTag = ParsedTagPragma
|
||||||
}
|
}
|
||||||
|
|
||||||
registerLiteral :: (Member InfoTableBuilder r) => LiteralLoc -> Sem r LiteralLoc
|
registerLiteral :: (Member InfoTableBuilder r) => LiteralLoc -> Sem r LiteralLoc
|
||||||
|
@ -13,6 +13,7 @@ data ParsedItemTag
|
|||||||
| ParsedTagLiteralInt
|
| ParsedTagLiteralInt
|
||||||
| ParsedTagLiteralString
|
| ParsedTagLiteralString
|
||||||
| ParsedTagComment
|
| ParsedTagComment
|
||||||
|
| ParsedTagPragma
|
||||||
| ParsedTagJudoc
|
| ParsedTagJudoc
|
||||||
| ParsedTagDelimiter
|
| ParsedTagDelimiter
|
||||||
deriving stock (Eq, Show, Generic)
|
deriving stock (Eq, Show, Generic)
|
||||||
|
@ -59,6 +59,9 @@ include = "include"
|
|||||||
alias :: (IsString s) => s
|
alias :: (IsString s) => s
|
||||||
alias = "alias"
|
alias = "alias"
|
||||||
|
|
||||||
|
pragma :: (IsString s) => s
|
||||||
|
pragma = "pragma"
|
||||||
|
|
||||||
import_ :: (IsString s) => s
|
import_ :: (IsString s) => s
|
||||||
import_ = "import"
|
import_ = "import"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user