mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Resolves #240 through grammar.
It's not the cleanest solution but I don't see too many alternatives. Modify grammar to explicitly allow the color literal to appear in fully qualified name.
This commit is contained in:
@@ -3,6 +3,8 @@ import processing.data.*;
|
||||
import processing.event.*;
|
||||
import processing.opengl.*;
|
||||
|
||||
import test.color;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.io.File;
|
||||
@@ -12,19 +14,18 @@ import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import test.color;
|
||||
|
||||
public class colorimport extends PApplet {
|
||||
|
||||
public void setup() {
|
||||
|
||||
|
||||
boolean test = true;
|
||||
int c1 = color(255, 255, 255);
|
||||
int c2 = test ? 0xFFA011CD : 0xC0C0C0C0;
|
||||
noLoop();
|
||||
|
||||
noLoop();
|
||||
}
|
||||
|
||||
static public void main(String[] passedArgs) {
|
||||
String[] appletArgs = new String[] { "color" };
|
||||
String[] appletArgs = new String[] { "colorimport" };
|
||||
if (passedArgs != null) {
|
||||
PApplet.main(concat(appletArgs, passedArgs));
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import test.color;
|
||||
|
||||
boolean test = true;
|
||||
color c1 = color(255, 255, 255);
|
||||
color c2 = test ? #A011CD : #C0C0C0C0;
|
||||
|
||||
Reference in New Issue
Block a user