sodaware / blitzmax-mode Goto Github PK
View Code? Open in Web Editor NEWAn Emacs major mode for editing BlitzMax source files
Home Page: https://www.sodaware.net/dev/tools/blitzmax-mode/
License: GNU General Public License v2.0
An Emacs major mode for editing BlitzMax source files
Home Page: https://www.sodaware.net/dev/tools/blitzmax-mode/
License: GNU General Public License v2.0
Repeat ... Until
is indented correctly. However, Repeat...Forever
does not indent correctly.
Example (wrong) indentation:
Repeat
' Content here
Forever
Should look like this:
Repeat
' Content here
Forever
TODO
blitzmax-mode-until-regexp
with Forever syntaxSingle-line if/then statements normally indent correctly, but they fail when nested inside another block:
If something Then
' Indented correctly
If False Then Continue
' Also indented correctly
Else
End If
Both the Else
and End If
should be indented level with the first If
, not the second (inline) one.
BlitzMax doesn't use escape sequences in strings. For example, a quote character is inserted as ~q
rather than \"
.
Backslash characters should be treated like any other character in a string. Currently they're treated as an escape character:
Print "I end in a backslash\"
' This will be font-locked as a string, rather than a comment
Almost certainly a regex issue.
Type MyType
Method _someMethod()
' Indents to here. Should be correctly indented
End Method ' This fails too
End Type
Abstract functions should not increase indentation.
' Incorrect indentation
Type MyType
Function doThis() Abstract
Function doThat() Abstract
End Type
' Correct indentation
Type MyType
Function doThis() Abstract
Function doThat() Abstract
End Type
Type _underType
' Should indent and doesn't
End Type
BlitzMax supports using a ;
character as a newline. Automatic indentation does not take this into account, so single-line definitions mangle the indent level:
Function iAmEmpty() ; End Function
Print "I should not be indented"
The second line should not be indented. This problem happens with all indented syntax: While
, Repeat
, For
, Function
, If
, Select
, Type
and Method
.
https://github.com/textmate/blitzmax.tmbundle
The TextMate bundle uses environment settings to compile projects, not just buffers. Thanks to .tm_properties
files, these can be set per directory/project, which is nice. I think with the power of .dir-locals.el
to auto-load when opening a buffer, one can do the same for Emacs.
My elisp isn't that good, that's why I didn't work on a PR right away and want to coordinate efforts first. What do you think?
The Extern
and End Extern
keywords do not currently indent their contents correctly. They also cause Function indentation to fail.
Example (wrong) indentation:
Extern
Function ExternalFunction()
Function AnotherExternalFunction()
End Extern
Should look like this:
Extern
Function ExternalFunction()
Function AnotherExternalFunction()
End Extern
TODO
The following code does not indent correctly:
If Self.entityHasItems(event.getEntity()) Then
' Should be indented
EndIf
Changing getEntity
to just tEnt
still causes the issue, so it's probably a regex issue.
Example that fails:
Type MyType
Function DoThis:SomeAbstractType()
' Indents to here. Should be indented properly
End Function
End Type
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.