Skip to content

Commit

Permalink
fix Haxe 4.3 deprecation warning for :enum
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Nov 15, 2023
1 parent ed4cdcf commit 08afe62
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/moonshine/lsp/CodeActionKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction
**/
@:enum
abstract CodeActionKind(String) from String to String {
#if haxe4 enum #else @:enum #end abstract CodeActionKind(String) from String to String {

/**
Empty kind.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/CompletionItemKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
@see https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve
**/
@:enum
abstract CompletionItemKind(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract CompletionItemKind(Int) from Int to Int {

var Text = 1;
var Method = 2;
var Function = 3;
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/CompletionItemTag.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#completionItemTag
**/
@:enum
abstract CompletionItemTag(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract CompletionItemTag(Int) from Int to Int {

/**
Render a completion as obsolete, usually using a strike-out.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/CompletionTriggerKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
**/
@:enum
abstract CompletionTriggerKind(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract CompletionTriggerKind(Int) from Int to Int {

/**
Completion was triggered by typing an identifier (24x7 code complete),
manual invocation (e.g Ctrl+Space) or via API.
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/DiagnosticSeverity.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#diagnostic
**/
@:enum
abstract DiagnosticSeverity(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract DiagnosticSeverity(Int) from Int to Int {

/**
Reports an error.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/DiagnosticTag.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#diagnosticTag
**/
@:enum
abstract DiagnosticTag(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract DiagnosticTag(Int) from Int to Int {

/**
Unused or unnecessary code.
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/FailureHandlingKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#failureHandlingKind
**/
@:enum
abstract FailureHandlingKind(String) from String to String {
#if haxe4 enum #else @:enum #end abstract FailureHandlingKind(String) from String to String {

/**
Applying the workspace change is simply aborted if one of the changes
provided fails. All operations executed before the failing operation
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/FileChangeType.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles
**/
@:enum
abstract FileChangeType(UInt) from UInt to UInt {
#if haxe4 enum #else @:enum #end abstract FileChangeType(UInt) from UInt to UInt {

var Created = 1;
var Changed = 2;
var Deleted = 3;
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/InsertTextFormat.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
**/
@:enum
abstract InsertTextFormat(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract InsertTextFormat(Int) from Int to Int {

/**
The primary text to be inserted is treated as a plain string.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/InsertTextMode.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#insertTextMode
**/
@:enum
abstract InsertTextMode(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract InsertTextMode(Int) from Int to Int {

/**
The insertion or replace strings is taken as it is. If the
value is multi line the lines below the cursor will be
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/MarkupKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#markupContent
**/
@:enum
abstract MarkupKind(String) from String to String {
#if haxe4 enum #else @:enum #end abstract MarkupKind(String) from String to String {

/**
Plain text is supported as a content format
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/MessageType.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#window_showMessage
**/
@:enum
abstract MessageType(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract MessageType(Int) from Int to Int {

/**
An error message.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/PrepareSupportDefaultBehavior.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#prepareSupportDefaultBehavior
**/
@:enum
abstract PrepareSupportDefaultBehavior(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract PrepareSupportDefaultBehavior(Int) from Int to Int {

/**
The client's default behavior is to select the identifier according the
to language's syntax rule.
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/ResourceOperationKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#resourceOperationKind
**/
@:enum
abstract ResourceOperationKind(String) from String to String {
#if haxe4 enum #else @:enum #end abstract ResourceOperationKind(String) from String to String {

/**
Supports creating new files and folders.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/SignatureHelpTriggerKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#textDocument_signatureHelp
**/
@:enum
abstract SignatureHelpTriggerKind(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract SignatureHelpTriggerKind(Int) from Int to Int {

/**
Signature help was invoked manually by the user or by a command.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/SymbolKind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol
@see https://microsoft.github.io/language-server-protocol/specification#workspace_symbol
**/
@:enum
abstract SymbolKind(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract SymbolKind(Int) from Int to Int {

var File = 1;
var Module = 2;
var Namespace = 3;
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/SymbolTag.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#symbolTag
**/
@:enum
abstract SymbolTag(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract SymbolTag(Int) from Int to Int {

/**
Render a symbol as obsolete, usually using a strike-out.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/TextDocumentSaveReason.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#textDocument_willSave
**/
@:enum
abstract TextDocumentSaveReason(Int) from Int to Int {
#if haxe4 enum #else @:enum #end abstract TextDocumentSaveReason(Int) from Int to Int {

/**
Manually triggered, e.g. by the user pressing save, by starting
debugging, or by an API call.
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/TokenFormat.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#tokenFormat
**/
@:enum
abstract TokenFormat(String) from String to String {
#if haxe4 enum #else @:enum #end abstract TokenFormat(String) from String to String {

/**
Tokens are described using relative positions.
**/
Expand Down
4 changes: 2 additions & 2 deletions src/moonshine/lsp/TraceValue.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ package moonshine.lsp;
@see https://microsoft.github.io/language-server-protocol/specification#traceValue
**/
@:enum
abstract TraceValue(String) from String to String {
#if haxe4 enum #else @:enum #end abstract TraceValue(String) from String to String {

/**
Turn off $/logTrace notifications
**/
Expand Down

0 comments on commit 08afe62

Please sign in to comment.