Search results

  1. F

    Feature ASH language server features

    Tokens are *already* planned to be able to store this information... Further down the line, we'll be adding the LSP4J (Language Server Protocol for Java) library to KoLmafia. One of the classes this gives us access to is called the Range, which is composed of two Positions, which, themselves...
  2. F

    Feature ASH language server features

    Since I know java language clients let you peek source code, I'm guessing there's a feature that asks for server-side context, but I haven't actually looked at *every* feature of the LSP in detail yet, so I don't quite know. Either way, the Parser.rewindBackTo() method pretty much require that...
  3. F

    Feature ASH language server features

    Here is the null checks patch. It doesn't conflict with the clearCurrentToken patch in any way, so you should be free to look at/apply them in any order you want. Here are the few (type of) cases it contains, with what was done for each: A null check that was genuinely only there as a...
  4. F

    Feature ASH language server features

    Here's the latter. It should only take a couple minutes at best (the only thing to change, if any, would be the method's javadoc)
  5. F

    Feature ASH language server features

    That, and the null checks, and the transformation of this.currentToken = null; this.currentLine.tokens.removeLast(); groups into a method
  6. F

    Feature ChoiceManager refactor

    Let's start with the simple goal of helping with the organization of ChoiceManager.java. Currently, it is very hard to tell in which of the "main" methods you are in (between CHOICE_DATA's initialization, dynamicChoiceSpoilers, dynamicChoiceOptions, preChoice, postChoice0, postChoice1...
  7. F

    Bug Ensure buffer of 3 unknown paths

    (forgot you can edit threads you created... should have done that a while ago...)
  8. F

    Bug Ensure buffer of 3 unknown paths

    sigh... Sorry, it's just... It's hard to keep your cool when non-devs are held to such high scrutiny, yet you see devs commiting things on the fly... I wouldn't call this aggressive, frankly. More like... panicked?
  9. F

    Bug - Fixed Missing default properties

    here are a few choice adventure properties that were missing from default.txt, as can be seen by opening mafia in a pristine folder, and see these properties being immediately added to <user>_prefs.txt
  10. F

    Bug Ensure buffer of 3 unknown paths

    per https://kolmafia.us/threads/int-my_path_id.25041/post-157784 the Path enum in AscensionPath.java needs a constant buffer of 3 unknown paths, otherwise, mafia would become unusable in new paths.
  11. F

    Feature - Implemented build.xml: have "daily" call "jar", and add a note about new JARs

    Context: <target name="jar" depends="compile"> <jar destfile="${jarfile}" basedir="${build}" update="true" index="true" compress="true"> <manifest> <attribute name="Main-Class" value="${main}"...
  12. F

    Feature ASH language server features

    Unused; for consistency and/or in case it's needed in the future.
  13. F

    Feature ASH language server features

    Here. This latest patch adds token examination to the tests. n.b. You'll note that, in typed constants and plural constants, the opening square bracket is part of the content token. This is a side-effect of having to (temporarily) throw out the...
  14. F

    Feature ASH language server features

    I guess it's my bad. When I mentioned this: I should have clarified; the "way to get all of a parser's tokens" that I was referencing was very much already in Parser.java. It is "called" by the Semantic Tokens feature. I can very much just put it into the current patch (minus a datatype that's...
  15. F

    Feature ASH language server features

    Parser_Tokens_7.patch addresses this concern, by making it impossible to call Parser.parse() if the zero-argument constructor was used, and by giving a default to Parser.getCurrentLine() (which was, yes, a liability so far). differences between this patch and the previous one:
  16. F

    Feature ASH language server features

    Anything I can do to help meanwhile? Tests or something?
  17. F

    Feature ASH language server features

    Wait... don't you mean "that behaviour is entirely *changed*"? I don't get how it's a bad thing that it's unchanged. Isn't that the point? Making sure that nothing changes on the existing front, while making sure it adds support for a new feature?
  18. F

    Feature ASH language server features

    Right, I forgot to (temporarily) change that comment. The check will be added in the next patch (as I said, "anything that is about to use Parser.restOfLine() ) Currently, though, the same result is achieved by that (seemingly useless) if ( this.currentToken() == null ) {...
  19. F

    Feature ASH language server features

    That's what I wanted to do (the "nuking the zero-argument constructor" part). But that zero-argument version is used for the "default" value of AshRuntime's "parser" field, which, itself, is clearly assumed to never be null. So it's just a matter of "Parser can't/isn't allowed to parse...
  20. F

    Feature ASH language server features

    This is what the Language Server needs. This may seems simple, currently, but later patches will add more functionalities to Tokens and Lines (mostly to Tokens), which the language server relies upon. I'm simply trying my best to mimic the current code's style/format. VScode already wraps lines...
Back
Top