Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new features (April~May 2024) #63

Merged
merged 61 commits into from
Oct 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
f3712e4
port to .NET 5 and enable Nullable
StanHash Jan 31, 2021
54bb84d
remove build output
StanHash Jan 31, 2021
97eaa50
Merge remote-tracking branch 'feu/master' into dotnet
StanHash Feb 10, 2021
b2d224a
set target framework to .NET 6 (latest LTS)
StanHash Sep 8, 2022
d9c49f8
Merge remote-tracking branch 'feu/master' into dotnet
StanHash May 4, 2023
4b72686
fix bad merge
StanHash May 4, 2023
67af0b2
update gitignore because I think sme broke it
StanHash May 25, 2023
7a5df38
ORG allows addresses, POIN allows anything + extra options
StanHash Apr 15, 2024
3f87c6c
fix some warnings
StanHash Apr 15, 2024
840086d
refactor use of Maybe
StanHash Apr 16, 2024
f1c9656
add conditional operators, fallback raws, some qol
StanHash Apr 17, 2024
2d56cd7
add #if directive
StanHash Apr 17, 2024
f425f9f
add alternative projet targetting traditional .NET framework
StanHash Apr 17, 2024
4d820ac
basic symbol assignment
StanHash Apr 17, 2024
5a732ca
add binary negation (bit flip) operator
StanHash Apr 18, 2024
d421357
symbol assignment can be lazy
StanHash Apr 18, 2024
2c6f67f
'??' operator + ASSERT changes + fixes
StanHash Apr 19, 2024
4187197
purge remains of Maybe
StanHash Apr 19, 2024
f11127a
fix macros treating vectors as multiple parameters
StanHash Apr 19, 2024
b2dca34
IsSymbolDefined built-in macro
StanHash Apr 19, 2024
2afb563
better error message when macro expansion doesn't result in valid sta…
StanHash Apr 19, 2024
194e24f
print better messages using format strings
StanHash Apr 19, 2024
69e5025
fixes to format string
StanHash Apr 20, 2024
ee90e8f
don't simplify parameters too early (broke ASSERT hack)
StanHash Apr 20, 2024
c289b64
refactor directive input
StanHash Apr 23, 2024
2ba1770
merge both ifdef with ifndef into one class
StanHash Apr 23, 2024
bd103bb
add ReadByteAt (and friends) built-in macro
StanHash Apr 23, 2024
07eb1a6
relocate macros to preprocessor
StanHash Apr 26, 2024
1fbbe8a
fix define
StanHash Apr 26, 2024
c8e0bda
refactor define (allow any token sequence) + non-productive definitions
StanHash Apr 26, 2024
95e2dd5
add very basic and bad and incomplete testing script
StanHash Apr 26, 2024
f4b7370
move Definition to Preprocessor namespace
StanHash Apr 26, 2024
b74b504
Add rudimentary __LINE__ support
StanHash Apr 26, 2024
58f6f74
Remember macro expansion location chain + working __FILE__
StanHash Apr 26, 2024
17918ff
warn on non-portable paths on windows + update vs solution
StanHash Apr 27, 2024
38a66cd
labels are now addresses
StanHash Apr 27, 2024
32ff5c9
refactor EAOptions
StanHash Apr 27, 2024
9376334
warn on suspicious expansion of macro featuring unguarded operators
StanHash Apr 27, 2024
7a4d069
allow tuning of warnings and extensions via commandline
StanHash Apr 27, 2024
3608375
attempt at a better diagnostic reguarding unintuitive expressions fro…
StanHash Apr 28, 2024
55fdf64
adjustments
StanHash Apr 28, 2024
b7596c7
fixes
StanHash Apr 28, 2024
0f48430
major parser restructuration
StanHash Apr 29, 2024
2efee5b
decouple parse from interpretation
StanHash Apr 29, 2024
1493cf2
change AST production
StanHash Apr 29, 2024
898ceee
UTF8, BASE64, directive refactor, better undef , less leaky CurrentOf…
StanHash Apr 30, 2024
8181f3f
add more tests + fix PROTECT 0
StanHash Apr 30, 2024
fe6d4aa
add tests gitignore
StanHash Apr 30, 2024
cf37d5d
fixes
StanHash May 1, 2024
ccc0350
add extra tests
StanHash May 1, 2024
9487fc3
SetSymbol macro detection, parse fixes, many small internal simplific…
StanHash May 4, 2024
0b10055
fix compile, UTF8 -> STRING, replace error with warning for some spec…
StanHash May 4, 2024
e0072f0
put parts Parser goes into new Interpreter namespace. rename EAInterp…
StanHash May 4, 2024
f443830
tbl and custom encoding support
StanHash May 4, 2024
4eee176
token location fixes
StanHash May 4, 2024
79d803f
do not translate offset 0 to address 0 except for POIN
StanHash May 4, 2024
0a474d0
fix STRING with no encoding + fix tests
StanHash May 4, 2024
3c2f369
fix major a oopsie (multi-line comments broke)
StanHash May 4, 2024
08dff62
fix "garbage" characters printed on Windows cmd (ANSI terminal escape…
StanHash May 4, 2024
5e5126a
remove many unused classes and methods
StanHash May 5, 2024
ead413d
add more tests
StanHash May 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes
StanHash committed Apr 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b7596c7c17d734e3b3456aea91592c323b0d7093
2 changes: 1 addition & 1 deletion ColorzCore/ColorzCore.Framework.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<TargetFramework>net48</TargetFramework>
<OutputType>Exe</OutputType>
<Nullable>annotations</Nullable>
<TargetName>ColorzCore</TargetName>
<AssemblyName>ColorzCore</AssemblyName>
<LangVersion>9</LangVersion>
<BaseOutputPath>bin/Framework</BaseOutputPath>
</PropertyGroup>
15 changes: 15 additions & 0 deletions ColorzCore/IO/IOUtility.cs
Original file line number Diff line number Diff line change
@@ -28,6 +28,21 @@ public static string GetToolFileName(string name)
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? $"{name}.exe" : name;
}

// HACK: this is to make Log not print the entire path every time
public static string GetPortableBasePathForPrefix(string name)
{
string? result = Path.GetDirectoryName(name);

if (string.IsNullOrEmpty(result))
{
return "";
}
else
{
return (result + '/').Replace('\\', '/');
}
}

private static readonly char[] pathSeparators = new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
private static readonly char[] invalidFileCharacters = Path.GetInvalidFileNameChars();

8 changes: 8 additions & 0 deletions ColorzCore/IO/Log.cs
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@ public enum MessageKind

public bool NoColoredTags { get; set; } = false;

public string LocationBasePath { get; set; } = string.Empty;

public List<MessageKind> IgnoredKinds { get; } = new List<MessageKind>();

public TextWriter Output { get; set; } = Console.Error;
@@ -89,6 +91,12 @@ public void Message(MessageKind kind, Location? source, string message)
if (source.HasValue)
{
string locString = source.Value.ToString();

if (locString.StartsWith(LocationBasePath))
{
locString = locString.Substring(LocationBasePath.Length);
}

Output.Write($"{locString}: ");
continueLength += locString.Length + 2;
}
Loading