{-# OPTIONS_GHC -fno-warn-missing-pattern-synonym-signatures #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
module Language.Rzk.VSCode.Tokens where
import Data.Aeson
import Data.String (IsString)
import Data.Text (Text)
import GHC.Generics (Generic)
data VSToken = VSToken
{ VSToken -> Int
line :: !Int
, VSToken -> Int
startCharacter :: !Int
, VSToken -> Int
length :: !Int
, VSToken -> VSTokenType
tokenType :: VSTokenType
, VSToken -> [VSTokenModifier]
tokenModifiers :: [VSTokenModifier]
} deriving (forall x. Rep VSToken x -> VSToken
forall x. VSToken -> Rep VSToken x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VSToken x -> VSToken
$cfrom :: forall x. VSToken -> Rep VSToken x
Generic, [VSToken] -> Encoding
[VSToken] -> Value
VSToken -> Encoding
VSToken -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [VSToken] -> Encoding
$ctoEncodingList :: [VSToken] -> Encoding
toJSONList :: [VSToken] -> Value
$ctoJSONList :: [VSToken] -> Value
toEncoding :: VSToken -> Encoding
$ctoEncoding :: VSToken -> Encoding
toJSON :: VSToken -> Value
$ctoJSON :: VSToken -> Value
ToJSON)
newtype VSTokenType = VSTokenType Text
deriving newtype ([VSTokenType] -> Encoding
[VSTokenType] -> Value
VSTokenType -> Encoding
VSTokenType -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [VSTokenType] -> Encoding
$ctoEncodingList :: [VSTokenType] -> Encoding
toJSONList :: [VSTokenType] -> Value
$ctoJSONList :: [VSTokenType] -> Value
toEncoding :: VSTokenType -> Encoding
$ctoEncoding :: VSTokenType -> Encoding
toJSON :: VSTokenType -> Value
$ctoJSON :: VSTokenType -> Value
ToJSON, String -> VSTokenType
forall a. (String -> a) -> IsString a
fromString :: String -> VSTokenType
$cfromString :: String -> VSTokenType
IsString)
newtype VSTokenModifier = VSTokenModifier Text
deriving newtype ([VSTokenModifier] -> Encoding
[VSTokenModifier] -> Value
VSTokenModifier -> Encoding
VSTokenModifier -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [VSTokenModifier] -> Encoding
$ctoEncodingList :: [VSTokenModifier] -> Encoding
toJSONList :: [VSTokenModifier] -> Value
$ctoJSONList :: [VSTokenModifier] -> Value
toEncoding :: VSTokenModifier -> Encoding
$ctoEncoding :: VSTokenModifier -> Encoding
toJSON :: VSTokenModifier -> Value
$ctoJSON :: VSTokenModifier -> Value
ToJSON, String -> VSTokenModifier
forall a. (String -> a) -> IsString a
fromString :: String -> VSTokenModifier
$cfromString :: String -> VSTokenModifier
IsString)
vs_namespace :: VSTokenType
vs_namespace :: VSTokenType
vs_namespace = Text -> VSTokenType
VSTokenType Text
"namespace"
vs_class :: VSTokenType
vs_class :: VSTokenType
vs_class = Text -> VSTokenType
VSTokenType Text
"class"
vs_enum :: VSTokenType
vs_enum :: VSTokenType
vs_enum = Text -> VSTokenType
VSTokenType Text
"enum"
vs_interface :: VSTokenType
vs_interface :: VSTokenType
vs_interface = Text -> VSTokenType
VSTokenType Text
"interface"
vs_struct :: VSTokenType
vs_struct :: VSTokenType
vs_struct = Text -> VSTokenType
VSTokenType Text
"struct"
vs_typeParameter :: VSTokenType
vs_typeParameter :: VSTokenType
vs_typeParameter = Text -> VSTokenType
VSTokenType Text
"typeParameter"
vs_type :: VSTokenType
vs_type :: VSTokenType
vs_type = Text -> VSTokenType
VSTokenType Text
"type"
vs_parameter :: VSTokenType
vs_parameter :: VSTokenType
vs_parameter = Text -> VSTokenType
VSTokenType Text
"parameter"
vs_variable :: VSTokenType
vs_variable :: VSTokenType
vs_variable = Text -> VSTokenType
VSTokenType Text
"variable"
vs_property :: VSTokenType
vs_property :: VSTokenType
vs_property = Text -> VSTokenType
VSTokenType Text
"property"
vs_enumMember :: VSTokenType
vs_enumMember :: VSTokenType
vs_enumMember = Text -> VSTokenType
VSTokenType Text
"enumMember"
vs_decorator :: VSTokenType
vs_decorator :: VSTokenType
vs_decorator = Text -> VSTokenType
VSTokenType Text
"decorator"
vs_event :: VSTokenType
vs_event :: VSTokenType
vs_event = Text -> VSTokenType
VSTokenType Text
"event"
vs_function :: VSTokenType
vs_function :: VSTokenType
vs_function = Text -> VSTokenType
VSTokenType Text
"function"
vs_method :: VSTokenType
vs_method :: VSTokenType
vs_method = Text -> VSTokenType
VSTokenType Text
"method"
vs_macro :: VSTokenType
vs_macro :: VSTokenType
vs_macro = Text -> VSTokenType
VSTokenType Text
"macro"
vs_label :: VSTokenType
vs_label :: VSTokenType
vs_label = Text -> VSTokenType
VSTokenType Text
"label"
vs_comment :: VSTokenType
= Text -> VSTokenType
VSTokenType Text
"comment"
vs_string :: VSTokenType
vs_string :: VSTokenType
vs_string = Text -> VSTokenType
VSTokenType Text
"string"
vs_keyword :: VSTokenType
vs_keyword :: VSTokenType
vs_keyword = Text -> VSTokenType
VSTokenType Text
"keyword"
vs_number :: VSTokenType
vs_number :: VSTokenType
vs_number = Text -> VSTokenType
VSTokenType Text
"number"
vs_regexp :: VSTokenType
vs_regexp :: VSTokenType
vs_regexp = Text -> VSTokenType
VSTokenType Text
"regexp"
vs_operator :: VSTokenType
vs_operator :: VSTokenType
vs_operator = Text -> VSTokenType
VSTokenType Text
"operator"
vs_declaration :: VSTokenModifier
vs_declaration :: VSTokenModifier
vs_declaration = Text -> VSTokenModifier
VSTokenModifier Text
"declaration"
vs_definition :: VSTokenModifier
vs_definition :: VSTokenModifier
vs_definition = Text -> VSTokenModifier
VSTokenModifier Text
"definition"
vs_readonly :: VSTokenModifier
vs_readonly :: VSTokenModifier
vs_readonly = Text -> VSTokenModifier
VSTokenModifier Text
"readonly"
vs_static :: VSTokenModifier
vs_static :: VSTokenModifier
vs_static = Text -> VSTokenModifier
VSTokenModifier Text
"static"
vs_deprecated :: VSTokenModifier
vs_deprecated :: VSTokenModifier
vs_deprecated = Text -> VSTokenModifier
VSTokenModifier Text
"deprecated"
vs_abstract :: VSTokenModifier
vs_abstract :: VSTokenModifier
vs_abstract = Text -> VSTokenModifier
VSTokenModifier Text
"abstract"
vs_async :: VSTokenModifier
vs_async :: VSTokenModifier
vs_async = Text -> VSTokenModifier
VSTokenModifier Text
"async"
vs_modification :: VSTokenModifier
vs_modification :: VSTokenModifier
vs_modification = Text -> VSTokenModifier
VSTokenModifier Text
"modification"
vs_documentation :: VSTokenModifier
vs_documentation :: VSTokenModifier
vs_documentation = Text -> VSTokenModifier
VSTokenModifier Text
"documentation"
vs_defaultLibrary :: VSTokenModifier
vs_defaultLibrary :: VSTokenModifier
vs_defaultLibrary = Text -> VSTokenModifier
VSTokenModifier Text
"defaultLibrary"