Language Definition Issues



  • I’ve cobbled together a customized version of a definition for Lua suitable for a particular API I’m working with (adding in keywords and constants from the API) but I have some issues.

    1. There is an undocumented limit to the number of keywords in a given keyword group. I’d like to know if there’s any way I can lift that limit or if that is somehow a technological barrier. This API has hundreds and hundreds of pre-defined functions and constants and I while I can get them in, I can’t get them in easily - I have to split them up and I have to go with “prefix mode” on the constants which loses me absolute validation on the names and risks marking things as constants that aren’t sometimes.

    2. Certain keywords from the API are relatively common words (I didn’t write it, I just use it). Things like ID and Name and such. I’d like very much to be able to differentiate between usage in Name() and MyTable.Name - right now, both “Name” entries are being treated as the keyword. and it’s quite confusing to look at.

    3. With the folders if, else, elseif, and end, if the end is the last word in the file and I do not follow it with an end-of-line mark or a space, it isn’t being recognized. I’ve verified that with the pre-defined lua language definition it is. I can’t figure out how to get what I’m doing to mimic that. That’s not true, by the way, for parentheses. If the last line of a file is the closing parenthesis of an in-line function, for example, that gets formatted correctly and it’s recognized as matched to it’s opening parenthesis.

    4. The decimal point is not appearing as part of “numbers” and I can’t figure out why. I made no special settings in the numbers section of the UDL dialog and I did verify that “dot” is selected as the Decimal separator (sic). It shows up, but 1234.56 shows up with 1234 formatted how I say to format numbers and .56 shows up like default text.

    5. I can’t figure out how to set my language definition to be the default one for the file types involved. I can set a file to my language definition, but there doesn’t seem to be a place to say “If the extension is .lua, use myLua” anywhere. How do I set that? Surely you don’t have to do this one file at a time forever do you?

    I have more questions, but let’s start with just those five. They’re the most pressing.