ecode icon indicating copy to clipboard operation
ecode copied to clipboard

Please add support for FixScript

Open yh15kla9 opened this issue 9 months ago • 7 comments

https://www.fixscript.org/

yh15kla9 avatar Mar 28 '25 05:03 yh15kla9

Is there any highlighter reference implementation? I couldn't find any.

SpartanJ avatar Mar 28 '25 14:03 SpartanJ

You, as the user of this language, have to make the syntax highlighting yourself. You don't understand the language well enough to do this. You have no real usage of this language. Why do you want to waste other people's time and effort on this useless task?

The first thing you can do to prove me wrong is to list all of the keywords of this language.

Curculigo avatar Mar 29 '25 03:03 Curculigo

@jezek2 could you give us some help providing the basics of the language grammars? keywords, strings, comments, numeric literals, etc. Documentation does not seem complete enough to get all this information. The language looks interesting, it deserves editor support. Thanks

SpartanJ avatar Apr 20 '25 00:04 SpartanJ

FixScript is an extensible language so the list here is for the base language and the official extensions only. A feature where an user could supply their own keywords per file/folder/project would be nice.

In the future LSP server will be probably available, but I focus on working on FixIDE first. Formatting would be highly problematic due to the extensive nature and probably not provided. At least I'm not sure how it could work with custom extensions (there can be an API for formatting, but not sure about the actual processing).

File extension: .fix Comments: classic // and /* */ Symbols: the table (include also the unused ones as they're used by extensions) Operator symbols: the table in this section (the <=> don't need to be specifically handled) Char literals: in single quotes, either with one character or up to 4 chars in LATIN1 ("fourcc") String literals: in double quotes Char/string escapes: https://www.fixscript.org/docs#literals Integer literals: in decimal or hexadecimal (starting with 0x) Float literals: the usual format (eg. 0.123e-45), can't start with just dot Predefined constants: true, false, null

Keywords

Base language

do
if
for
use
var
case
else
break
const
while
import
return
switch
default
continue
function

Macros

macro
generate
output

Classes

foreach
class
struct
static
virtual
override
new
in
as
throw
constructor
operator
super
this

Native

extern
struct
union
typedef

Optional

optional

Transaction

transaction

Types

Classes

Dynamic
Void
Byte
Short
Integer
Float
Boolean
String
Long
Double

Native

char
short
int
long
float
double
void
int8_t
uint8_t
int16_t
uint16_t
int32_t
uint32_t
int64_t
uint64_t
wchar_t

jezek2 avatar Apr 21 '25 08:04 jezek2

@jezek2 awesome, thank you very much, I'll implement it soon.

SpartanJ avatar Apr 21 '25 13:04 SpartanJ

Added.

SpartanJ avatar Apr 21 '25 21:04 SpartanJ