-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
This is Issue 546 moved from a Google Code project.
Added by 2011-05-20T10:15:37.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium
Original description
What steps will reproduce the problem?
- Create a library, and create keywords.txt
- Create keywords of type KEYWORD1 and KEYWORD2
- for keyword of type KEYWORD1, use more than one tab between the keyword and KEYWORD1
- do the same (use more than one tab) for keywords of type KEYWORD2
- Load the IDE, import the library, and test the highlighting functionality for your library
- notice that KEYWORD2 keywords get highlighted, but KEYWORD1 keyword doesn't
- modify keywords.txt so that the KEYWORD1 keyword only has a single tab, leave the KEYWORD2 keywords with multiple tabs
- Restart IDE, and test highlighting, now KEYWORD1 keyword is highlighted
What is the expected output? What do you see instead?
Because KEYWORD2 keywords allow an arbitrary number of tabs (which is useful for making the file look clean), I would expect the same to apply to KEYWORD1 keywords. The IDE doesn't agree. The rules between the two types of keywords are inconsistent.
What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?
- 64-bit Ubuntu 10.04. Board not relevant, but Duemillanove.
Please provide any additional information below.
I think the issue is likely to lie in /app/src/processing/app/syntax/PdeKeywords.java, specifically the function getKeywords. This was the only code I could find dealing with parsing out tabs looking for the "KEYWORDx" token.
Unfortunately I'm not familiar with Java or the codebase, so I'm hoping this is an easy fix for someone. I've attached examples of a working and non-working keywords.txt to clarify my report.
Additionally, I'm wondering if there's a formal spec for keywords.txt posted somewhere.
I also appologize for having to use the word "keyword" so many times, but I couldn't think of a better way to express the bug. :P