refactor: manual pre-cleanup

Moving comments, adding `format-ignore` to lines that will be better
with it
This commit is contained in:
Pham Huy Hoang 2024-01-05 03:19:54 +09:00 committed by Christian Clason
parent 15de22a2e1
commit edee83272e
37 changed files with 1656 additions and 1595 deletions

View file

@ -127,216 +127,217 @@
;; type_names = sort(union(get_types(Core), get_types(Base)))
;;
((identifier) @type.builtin
(#any-of? @type.builtin
"AbstractArray"
"AbstractChannel"
"AbstractChar"
"AbstractDict"
"AbstractDisplay"
"AbstractFloat"
"AbstractIrrational"
"AbstractLock"
"AbstractMatch"
"AbstractMatrix"
"AbstractPattern"
"AbstractRange"
"AbstractSet"
"AbstractSlices"
"AbstractString"
"AbstractUnitRange"
"AbstractVecOrMat"
"AbstractVector"
"Any"
"ArgumentError"
"Array"
"AssertionError"
"Atomic"
"BigFloat"
"BigInt"
"BitArray"
"BitMatrix"
"BitSet"
"BitVector"
"Bool"
"BoundsError"
"By"
"CanonicalIndexError"
"CapturedException"
"CartesianIndex"
"CartesianIndices"
"Cchar"
"Cdouble"
"Cfloat"
"Channel"
"Char"
"Cint"
"Cintmax_t"
"Clong"
"Clonglong"
"Cmd"
"Colon"
"ColumnSlices"
"Complex"
"ComplexF16"
"ComplexF32"
"ComplexF64"
"ComposedFunction"
"CompositeException"
"ConcurrencyViolationError"
"Condition"
"Cptrdiff_t"
"Cshort"
"Csize_t"
"Cssize_t"
"Cstring"
"Cuchar"
"Cuint"
"Cuintmax_t"
"Culong"
"Culonglong"
"Cushort"
"Cvoid"
"Cwchar_t"
"Cwstring"
"DataType"
"DenseArray"
"DenseMatrix"
"DenseVecOrMat"
"DenseVector"
"Dict"
"DimensionMismatch"
"Dims"
"DivideError"
"DomainError"
"EOFError"
"Enum"
"ErrorException"
"Exception"
"ExponentialBackOff"
"Expr"
"Float16"
"Float32"
"Float64"
"Function"
"GlobalRef"
"HTML"
"IO"
"IOBuffer"
"IOContext"
"IOStream"
"IdDict"
"IndexCartesian"
"IndexLinear"
"IndexStyle"
"InexactError"
"InitError"
"Int"
"Int128"
"Int16"
"Int32"
"Int64"
"Int8"
"Integer"
"InterruptException"
"InvalidStateException"
"Irrational"
"KeyError"
"LazyString"
"LinRange"
"LineNumberNode"
"LinearIndices"
"LoadError"
"Lt"
"MIME"
"Matrix"
"Method"
"MethodError"
"Missing"
"MissingException"
"Module"
"NTuple"
"NamedTuple"
"Nothing"
"Number"
"Ordering"
"OrdinalRange"
"OutOfMemoryError"
"OverflowError"
"Pair"
"ParseError"
"PartialQuickSort"
"Perm"
"PermutedDimsArray"
"Pipe"
"ProcessFailedException"
"Ptr"
"QuoteNode"
"Rational"
"RawFD"
"ReadOnlyMemoryError"
"Real"
"ReentrantLock"
"Ref"
"Regex"
"RegexMatch"
"Returns"
"ReverseOrdering"
"RoundingMode"
"RowSlices"
"SegmentationFault"
"Set"
"Signed"
"Slices"
"Some"
"SpinLock"
"StackFrame"
"StackOverflowError"
"StackTrace"
"Stateful"
"StepRange"
"StepRangeLen"
"StridedArray"
"StridedMatrix"
"StridedVecOrMat"
"StridedVector"
"String"
"StringIndexError"
"SubArray"
"SubString"
"SubstitutionString"
"Symbol"
"SystemError"
"Task"
"TaskFailedException"
"Text"
"TextDisplay"
"Timer"
"Tmstruct"
"Tuple"
"Type"
"TypeError"
"TypeVar"
"UInt"
"UInt128"
"UInt16"
"UInt32"
"UInt64"
"UInt8"
"UndefInitializer"
"UndefKeywordError"
"UndefRefError"
"UndefVarError"
"Union"
"UnionAll"
"UnitRange"
"Unsigned"
"Val"
"VecElement"
"VecOrMat"
"Vector"
"VersionNumber"
"WeakKeyDict"
"WeakRef"))
; format-ignore
(#any-of? @type.builtin
"AbstractArray"
"AbstractChannel"
"AbstractChar"
"AbstractDict"
"AbstractDisplay"
"AbstractFloat"
"AbstractIrrational"
"AbstractLock"
"AbstractMatch"
"AbstractMatrix"
"AbstractPattern"
"AbstractRange"
"AbstractSet"
"AbstractSlices"
"AbstractString"
"AbstractUnitRange"
"AbstractVecOrMat"
"AbstractVector"
"Any"
"ArgumentError"
"Array"
"AssertionError"
"Atomic"
"BigFloat"
"BigInt"
"BitArray"
"BitMatrix"
"BitSet"
"BitVector"
"Bool"
"BoundsError"
"By"
"CanonicalIndexError"
"CapturedException"
"CartesianIndex"
"CartesianIndices"
"Cchar"
"Cdouble"
"Cfloat"
"Channel"
"Char"
"Cint"
"Cintmax_t"
"Clong"
"Clonglong"
"Cmd"
"Colon"
"ColumnSlices"
"Complex"
"ComplexF16"
"ComplexF32"
"ComplexF64"
"ComposedFunction"
"CompositeException"
"ConcurrencyViolationError"
"Condition"
"Cptrdiff_t"
"Cshort"
"Csize_t"
"Cssize_t"
"Cstring"
"Cuchar"
"Cuint"
"Cuintmax_t"
"Culong"
"Culonglong"
"Cushort"
"Cvoid"
"Cwchar_t"
"Cwstring"
"DataType"
"DenseArray"
"DenseMatrix"
"DenseVecOrMat"
"DenseVector"
"Dict"
"DimensionMismatch"
"Dims"
"DivideError"
"DomainError"
"EOFError"
"Enum"
"ErrorException"
"Exception"
"ExponentialBackOff"
"Expr"
"Float16"
"Float32"
"Float64"
"Function"
"GlobalRef"
"HTML"
"IO"
"IOBuffer"
"IOContext"
"IOStream"
"IdDict"
"IndexCartesian"
"IndexLinear"
"IndexStyle"
"InexactError"
"InitError"
"Int"
"Int128"
"Int16"
"Int32"
"Int64"
"Int8"
"Integer"
"InterruptException"
"InvalidStateException"
"Irrational"
"KeyError"
"LazyString"
"LinRange"
"LineNumberNode"
"LinearIndices"
"LoadError"
"Lt"
"MIME"
"Matrix"
"Method"
"MethodError"
"Missing"
"MissingException"
"Module"
"NTuple"
"NamedTuple"
"Nothing"
"Number"
"Ordering"
"OrdinalRange"
"OutOfMemoryError"
"OverflowError"
"Pair"
"ParseError"
"PartialQuickSort"
"Perm"
"PermutedDimsArray"
"Pipe"
"ProcessFailedException"
"Ptr"
"QuoteNode"
"Rational"
"RawFD"
"ReadOnlyMemoryError"
"Real"
"ReentrantLock"
"Ref"
"Regex"
"RegexMatch"
"Returns"
"ReverseOrdering"
"RoundingMode"
"RowSlices"
"SegmentationFault"
"Set"
"Signed"
"Slices"
"Some"
"SpinLock"
"StackFrame"
"StackOverflowError"
"StackTrace"
"Stateful"
"StepRange"
"StepRangeLen"
"StridedArray"
"StridedMatrix"
"StridedVecOrMat"
"StridedVector"
"String"
"StringIndexError"
"SubArray"
"SubString"
"SubstitutionString"
"Symbol"
"SystemError"
"Task"
"TaskFailedException"
"Text"
"TextDisplay"
"Timer"
"Tmstruct"
"Tuple"
"Type"
"TypeError"
"TypeVar"
"UInt"
"UInt128"
"UInt16"
"UInt32"
"UInt64"
"UInt8"
"UndefInitializer"
"UndefKeywordError"
"UndefRefError"
"UndefVarError"
"Union"
"UnionAll"
"UnitRange"
"Unsigned"
"Val"
"VecElement"
"VecOrMat"
"Vector"
"VersionNumber"
"WeakKeyDict"
"WeakRef"))
((identifier) @variable.builtin
(#any-of? @variable.builtin "begin" "end")

View file

@ -52,8 +52,9 @@
parameter: (identifier) @local.definition.parameter
(_))
;; Single parameter arrow function
(function_expression
. (identifier) @local.definition.parameter) ;; Single parameter arrow function
. (identifier) @local.definition.parameter)
;;; Function/macro definitions