JET-50 Drop the 'new' keyword
This commit is contained in:
@@ -87,7 +87,7 @@ atomicExpression
|
||||
: when
|
||||
: try
|
||||
: "typeof" "(" expression ")"
|
||||
: "new" constructorInvocation
|
||||
// : "new" constructorInvocation
|
||||
: objectLiteral
|
||||
// : declaration
|
||||
: jump
|
||||
|
||||
@@ -74,7 +74,7 @@ public interface JetNodeTypes {
|
||||
JetNodeType TUPLE = new JetNodeType("TUPLE", JetTupleExpression.class);
|
||||
JetNodeType PARENTHESIZED = new JetNodeType("PARENTHESIZED", JetParenthesizedExpression.class);
|
||||
JetNodeType TYPEOF = new JetNodeType("TYPEOF", JetTypeofExpression.class);
|
||||
JetNodeType NEW = new JetNodeType("NEW", JetNewExpression.class);
|
||||
// JetNodeType NEW = new JetNodeType("NEW", JetNewExpression.class);
|
||||
JetNodeType RETURN = new JetNodeType("RETURN", JetReturnExpression.class);
|
||||
JetNodeType THROW = new JetNodeType("THROW", JetThrowExpression.class);
|
||||
JetNodeType CONTINUE = new JetNodeType("CONTINUE", JetContinueExpression.class);
|
||||
|
||||
@@ -673,7 +673,10 @@ public class ExpressionCodegen extends JetVisitor {
|
||||
|
||||
if (callee instanceof JetSimpleNameExpression) {
|
||||
DeclarationDescriptor funDescriptor = bindingContext.resolveReferenceExpression((JetSimpleNameExpression) callee);
|
||||
if (funDescriptor instanceof FunctionDescriptor) {
|
||||
if (funDescriptor instanceof ConstructorDescriptor) {
|
||||
generateConstructorCall(expression, (JetSimpleNameExpression) callee);
|
||||
}
|
||||
else if (funDescriptor instanceof FunctionDescriptor) {
|
||||
final DeclarationDescriptor functionParent = funDescriptor.getContainingDeclaration();
|
||||
if (isNumberPrimitive(functionParent)) {
|
||||
if (funDescriptor.getName().equals("inv")) {
|
||||
@@ -1322,11 +1325,7 @@ public class ExpressionCodegen extends JetVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitNewExpression(JetNewExpression expression) {
|
||||
JetTypeReference typeReference = expression.getTypeReference();
|
||||
final JetUserType constructorType = (JetUserType) typeReference.getTypeElement();
|
||||
final JetSimpleNameExpression constructorReference = constructorType.getReferenceExpression();
|
||||
private void generateConstructorCall(JetCallExpression expression, JetSimpleNameExpression constructorReference) {
|
||||
DeclarationDescriptor constructorDescriptor = bindingContext.resolveReferenceExpression(constructorReference);
|
||||
final PsiElement declaration = bindingContext.getDeclarationPsiElement(constructorDescriptor);
|
||||
Type type;
|
||||
@@ -1334,7 +1333,7 @@ public class ExpressionCodegen extends JetVisitor {
|
||||
type = generateJavaConstructorCall(expression, (PsiMethod) declaration);
|
||||
}
|
||||
else if (constructorDescriptor instanceof ConstructorDescriptor) {
|
||||
type = typeMapper.mapType(bindingContext.resolveTypeReference(typeReference), OwnerKind.IMPLEMENTATION);
|
||||
type = typeMapper.mapType(bindingContext.getExpressionType(expression), OwnerKind.IMPLEMENTATION);
|
||||
if (type.getSort() == Type.ARRAY) {
|
||||
generateNewArray(expression, type);
|
||||
}
|
||||
@@ -1350,8 +1349,8 @@ public class ExpressionCodegen extends JetVisitor {
|
||||
Method method = typeMapper.mapConstructorSignature((ConstructorDescriptor) constructorDescriptor, OwnerKind.IMPLEMENTATION);
|
||||
pushMethodArguments(expression, method);
|
||||
|
||||
for (JetTypeReference typeArgumentReference : constructorType.getTypeArgumentsAsTypes()) {
|
||||
JetType typeArgument = bindingContext.resolveTypeReference(typeArgumentReference);
|
||||
for (JetTypeProjection jetTypeArgument : expression.getTypeArguments()) {
|
||||
JetType typeArgument = bindingContext.resolveTypeReference(jetTypeArgument.getTypeReference());
|
||||
// TODO is the makeNullable() call correct here?
|
||||
ClassCodegen.newTypeInfo(v, typeMapper.mapType(TypeUtils.makeNullable(typeArgument)));
|
||||
}
|
||||
@@ -1371,7 +1370,7 @@ public class ExpressionCodegen extends JetVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
private Type generateJavaConstructorCall(JetNewExpression expression, PsiMethod constructor) {
|
||||
private Type generateJavaConstructorCall(JetCallExpression expression, PsiMethod constructor) {
|
||||
PsiClass javaClass = constructor.getContainingClass();
|
||||
Type type = JetTypeMapper.psiClassType(javaClass);
|
||||
v.anew(type);
|
||||
@@ -1382,7 +1381,7 @@ public class ExpressionCodegen extends JetVisitor {
|
||||
return type;
|
||||
}
|
||||
|
||||
private void generateNewArray(JetNewExpression expression, Type type) {
|
||||
private void generateNewArray(JetCallExpression expression, Type type) {
|
||||
List<JetArgument> args = expression.getValueArguments();
|
||||
if (args.size() != 1) {
|
||||
throw new CompilationException("array constructor requires one value argument");
|
||||
|
||||
@@ -546,13 +546,13 @@ public class JetControlFlowProcessor {
|
||||
builder.read(expression);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitNewExpression(JetNewExpression expression) {
|
||||
// TODO : Instantiated class is loaded
|
||||
// TODO : type arguments?
|
||||
visitCall(expression);
|
||||
builder.read(expression);
|
||||
}
|
||||
// @Override
|
||||
// public void visitNewExpression(JetNewExpression expression) {
|
||||
// // TODO : Instantiated class is loaded
|
||||
// // TODO : type arguments?
|
||||
// visitCall(expression);
|
||||
// builder.read(expression);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void visitProperty(JetProperty property) {
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface ClassDescriptor extends ClassifierDescriptor {
|
||||
JetScope getMemberScope(List<TypeProjection> typeArguments);
|
||||
|
||||
@NotNull
|
||||
FunctionGroup getConstructors(List<TypeProjection> typeArguments);
|
||||
FunctionGroup getConstructors();
|
||||
|
||||
@Nullable
|
||||
ConstructorDescriptor getUnsubstitutedPrimaryConstructor();
|
||||
|
||||
@@ -37,10 +37,14 @@ public class ClassDescriptorImpl extends DeclarationDescriptorImpl implements Cl
|
||||
this.memberDeclarations = memberDeclarations;
|
||||
this.constructors = constructors;
|
||||
this.primaryConstructor = primaryConstructor;
|
||||
assert !constructors.isEmpty() || primaryConstructor == null;
|
||||
// assert !constructors.isEmpty() || primaryConstructor == null;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setPrimaryConstructor(@NotNull ConstructorDescriptor primaryConstructor) {
|
||||
this.primaryConstructor = primaryConstructor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public TypeConstructor getTypeConstructor() {
|
||||
@@ -66,13 +70,13 @@ public class ClassDescriptorImpl extends DeclarationDescriptorImpl implements Cl
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionGroup getConstructors(List<TypeProjection> typeArguments) {
|
||||
assert typeArguments.size() == getTypeConstructor().getParameters().size() : "Argument list length mismatch for " + getName();
|
||||
if (typeArguments.size() == 0) {
|
||||
return constructors;
|
||||
}
|
||||
Map<TypeConstructor, TypeProjection> substitutionContext = TypeUtils.buildSubstitutionContext(getTypeConstructor().getParameters(), typeArguments);
|
||||
return new LazySubstitutingFunctionGroup(TypeSubstitutor.create(substitutionContext), constructors);
|
||||
public FunctionGroup getConstructors() {
|
||||
// assert typeArguments.size() == getTypeConstructor().getParameters().size() : "Argument list length mismatch for " + getName();
|
||||
// if (typeArguments.size() == 0) {
|
||||
// return constructors;
|
||||
// }
|
||||
// Map<TypeConstructor, TypeProjection> substitutionContext = TypeUtils.buildSubstitutionContext(getTypeConstructor().getParameters(), typeArguments);
|
||||
return constructors;// LazySubstitutingFunctionGroup(TypeSubstitutor.create(substitutionContext), constructors);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -32,8 +32,8 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements
|
||||
return super.initialize(null, typeParameters, unsubstitutedValueParameters, unsubstitutedReturnType);
|
||||
}
|
||||
|
||||
public ConstructorDescriptor initialize(@NotNull List<ValueParameterDescriptor> unsubstitutedValueParameters) {
|
||||
super.initialize(null, Collections.<TypeParameterDescriptor>emptyList(), unsubstitutedValueParameters, null);
|
||||
public ConstructorDescriptorImpl initialize(@NotNull List<TypeParameterDescriptor> typeParameters, @NotNull List<ValueParameterDescriptor> unsubstitutedValueParameters) {
|
||||
super.initialize(null, typeParameters, unsubstitutedValueParameters, null);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -59,12 +59,6 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements
|
||||
return isPrimary;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<TypeParameterDescriptor> getTypeParameters() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Set<? extends FunctionDescriptor> getOverriddenFunctions() {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class LazySubstitutingClassDescriptor implements ClassDescriptor {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionGroup getConstructors(List<TypeProjection> typeArguments) {
|
||||
public FunctionGroup getConstructors() {
|
||||
throw new UnsupportedOperationException(); // TODO
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,10 @@ public class MutableClassDescriptor extends MutableDeclarationDescriptor impleme
|
||||
|
||||
public void addConstructor(@NotNull ConstructorDescriptor constructorDescriptor) {
|
||||
assert constructorDescriptor.getContainingDeclaration() == this;
|
||||
// assert constructorDescriptor.getTypeParameters().size() == getTypeConstructor().getParameters().size();
|
||||
constructors.addFunction(constructorDescriptor);
|
||||
if (defaultType != null) {
|
||||
// constructorDescriptor.getTypeParameters().addAll(typeParameters);
|
||||
((ConstructorDescriptorImpl) constructorDescriptor).setReturnType(getDefaultType());
|
||||
}
|
||||
}
|
||||
@@ -154,6 +156,7 @@ public class MutableClassDescriptor extends MutableDeclarationDescriptor impleme
|
||||
supertypes);
|
||||
scopeForMemberResolution.setThisType(getDefaultType());
|
||||
for (FunctionDescriptor functionDescriptor : constructors.getFunctionDescriptors()) {
|
||||
// functionDescriptor.getTypeParameters().addAll(typeParameters);
|
||||
((ConstructorDescriptorImpl) functionDescriptor).setReturnType(getDefaultType());
|
||||
}
|
||||
}
|
||||
@@ -180,15 +183,16 @@ public class MutableClassDescriptor extends MutableDeclarationDescriptor impleme
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionGroup getConstructors(List<TypeProjection> typeArguments) {
|
||||
public FunctionGroup getConstructors() {
|
||||
// TODO : Duplicates ClassDescriptorImpl
|
||||
assert typeArguments.size() == getTypeConstructor().getParameters().size();
|
||||
// assert typeArguments.size() == getTypeConstructor().getParameters().size();
|
||||
|
||||
if (typeArguments.size() == 0) {
|
||||
return constructors;
|
||||
}
|
||||
Map<TypeConstructor, TypeProjection> substitutionContext = TypeUtils.buildSubstitutionContext(getTypeConstructor().getParameters(), typeArguments);
|
||||
return new LazySubstitutingFunctionGroup(TypeSubstitutor.create(substitutionContext), constructors);
|
||||
// if (typeArguments.size() == 0) {
|
||||
// return constructors;
|
||||
// }
|
||||
// Map<TypeConstructor, TypeProjection> substitutionContext = TypeUtils.buildSubstitutionContext(getTypeConstructor().getParameters(), typeArguments);
|
||||
// return new LazySubstitutingFunctionGroup(TypeSubstitutor.create(substitutionContext), constructors);
|
||||
return constructors;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -22,7 +22,8 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
INTEGER_LITERAL, LONG_LITERAL, FLOAT_LITERAL, CHARACTER_LITERAL, STRING_LITERAL, RAW_STRING_LITERAL,
|
||||
NAMESPACE_KEYWORD, AS_KEYWORD, TYPE_KEYWORD, CLASS_KEYWORD, THIS_KEYWORD, VAL_KEYWORD, VAR_KEYWORD,
|
||||
FUN_KEYWORD, EXTENSION_KEYWORD, FOR_KEYWORD, NULL_KEYWORD, TYPEOF_KEYWORD,
|
||||
NEW_KEYWORD, TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD,
|
||||
// NEW_KEYWORD,
|
||||
TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD,
|
||||
CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD, TRY_KEYWORD, ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD,
|
||||
WHEN_KEYWORD, RBRACKET, RBRACE, RPAR, PLUSPLUS, MINUSMINUS, MUL, PLUS, MINUS, EXCL, DIV, PERC, LTEQ,
|
||||
// TODO GTEQ, foo<bar, baz>=x
|
||||
@@ -54,7 +55,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
WHEN_KEYWORD, // when
|
||||
TRY_KEYWORD, // try
|
||||
TYPEOF_KEYWORD, // typeof
|
||||
NEW_KEYWORD, // new
|
||||
// NEW_KEYWORD, // new
|
||||
OBJECT_KEYWORD, // object
|
||||
|
||||
// jump
|
||||
@@ -497,9 +498,9 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
else if (at(TYPEOF_KEYWORD)) {
|
||||
parseTypeOf();
|
||||
}
|
||||
else if (at(NEW_KEYWORD)) {
|
||||
parseNew();
|
||||
}
|
||||
// else if (at(NEW_KEYWORD)) {
|
||||
// parseNew();
|
||||
// }
|
||||
else if (at(OBJECT_KEYWORD)) {
|
||||
parseObjectLiteral();
|
||||
}
|
||||
@@ -1446,23 +1447,23 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
marker.done(THROW);
|
||||
}
|
||||
|
||||
/*
|
||||
* "new" constructorInvocation // identical to new functionCall
|
||||
*
|
||||
* constructorInvocation
|
||||
* : userType callSuffix
|
||||
*/
|
||||
private void parseNew() {
|
||||
assert _at(NEW_KEYWORD);
|
||||
|
||||
PsiBuilder.Marker creation = mark();
|
||||
advance(); // NEW_KEYWORD
|
||||
|
||||
myJetParsing.parseTypeRef();
|
||||
parseCallSuffix();
|
||||
|
||||
creation.done(NEW);
|
||||
}
|
||||
// /*
|
||||
// * "new" constructorInvocation // identical to new functionCall
|
||||
// *
|
||||
// * constructorInvocation
|
||||
// * : userType callSuffix
|
||||
// */
|
||||
// private void parseNew() {
|
||||
// assert _at(NEW_KEYWORD);
|
||||
//
|
||||
// PsiBuilder.Marker creation = mark();
|
||||
// advance(); // NEW_KEYWORD
|
||||
//
|
||||
// myJetParsing.parseTypeRef();
|
||||
// parseCallSuffix();
|
||||
//
|
||||
// creation.done(NEW);
|
||||
// }
|
||||
|
||||
/*
|
||||
* "typeof" "(" element ")"
|
||||
|
||||
@@ -41,6 +41,14 @@ public class JetDelegatorToSuperCall extends JetDelegationSpecifier implements J
|
||||
@NotNull
|
||||
@Override
|
||||
public List<JetTypeProjection> getTypeArguments() {
|
||||
JetTypeReference typeReference = getTypeReference();
|
||||
if (typeReference != null) {
|
||||
JetTypeElement typeElement = typeReference.getTypeElement();
|
||||
if (typeElement instanceof JetUserType) {
|
||||
JetUserType userType = (JetUserType) typeElement;
|
||||
return userType.getTypeArguments();
|
||||
}
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,60 +1,52 @@
|
||||
package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class JetNewExpression extends JetExpression implements JetCall {
|
||||
public JetNewExpression(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(JetVisitor visitor) {
|
||||
visitor.visitNewExpression(this);
|
||||
}
|
||||
|
||||
@Nullable @IfNotParsed
|
||||
public JetTypeReference getTypeReference() {
|
||||
return (JetTypeReference) findChildByType(JetNodeTypes.TYPE_REFERENCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public JetArgumentList getValueArgumentList() {
|
||||
return (JetArgumentList) findChildByType(JetNodeTypes.VALUE_ARGUMENT_LIST);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public List<JetArgument> getValueArguments() {
|
||||
JetArgumentList list = getValueArgumentList();
|
||||
return list != null ? list.getArguments() : Collections.<JetArgument>emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public List<JetExpression> getFunctionLiteralArguments() {
|
||||
return findChildrenByType(JetNodeTypes.FUNCTION_LITERAL);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<JetTypeProjection> getTypeArguments() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JetElement asElement() {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
//public class JetNewExpression extends JetExpression implements JetCall {
|
||||
// public JetNewExpression(@NotNull ASTNode node) {
|
||||
// super(node);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void accept(JetVisitor visitor) {
|
||||
// visitor.visitNewExpression(this);
|
||||
// }
|
||||
//
|
||||
// @Nullable @IfNotParsed
|
||||
// public JetTypeReference getTypeReference() {
|
||||
// return (JetTypeReference) findChildByType(JetNodeTypes.TYPE_REFERENCE);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Nullable
|
||||
// public JetArgumentList getValueArgumentList() {
|
||||
// return (JetArgumentList) findChildByType(JetNodeTypes.VALUE_ARGUMENT_LIST);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @NotNull
|
||||
// public List<JetArgument> getValueArguments() {
|
||||
// JetArgumentList list = getValueArgumentList();
|
||||
// return list != null ? list.getArguments() : Collections.<JetArgument>emptyList();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @NotNull
|
||||
// public List<JetExpression> getFunctionLiteralArguments() {
|
||||
// return findChildrenByType(JetNodeTypes.FUNCTION_LITERAL);
|
||||
// }
|
||||
//
|
||||
// @NotNull
|
||||
// @Override
|
||||
// public List<JetTypeProjection> getTypeArguments() {
|
||||
// return Collections.emptyList();
|
||||
// }
|
||||
//
|
||||
// @NotNull
|
||||
// @Override
|
||||
// public JetElement asElement() {
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
@@ -174,10 +174,10 @@ public class JetVisitor extends PsiElementVisitor {
|
||||
visitExpression(expression);
|
||||
}
|
||||
|
||||
public void visitNewExpression(JetNewExpression expression) {
|
||||
visitExpression(expression);
|
||||
}
|
||||
|
||||
// public void visitNewExpression(JetNewExpression expression) {
|
||||
// visitExpression(expression);
|
||||
// }
|
||||
//
|
||||
public void visitReturnExpression(JetReturnExpression expression) {
|
||||
visitLabelQualifiedExpression(expression);
|
||||
}
|
||||
|
||||
@@ -96,21 +96,26 @@ public class ClassDescriptorResolver {
|
||||
}
|
||||
|
||||
WritableFunctionGroup constructors = new WritableFunctionGroup("<init>");
|
||||
for (JetConstructor constructor : classElement.getSecondaryConstructors()) {
|
||||
constructors.addFunction(resolveSecondaryConstructorDescriptor(memberDeclarations, classDescriptor, constructor));
|
||||
}
|
||||
ConstructorDescriptor primaryConstructorDescriptor = resolvePrimaryConstructorDescriptor(scope, classDescriptor, classElement);
|
||||
if (primaryConstructorDescriptor != null) {
|
||||
constructors.addFunction(primaryConstructorDescriptor);
|
||||
}
|
||||
return classDescriptor.initialize(
|
||||
classDescriptor.initialize(
|
||||
!open,
|
||||
typeParameters,
|
||||
supertypes,
|
||||
memberDeclarations,
|
||||
constructors,
|
||||
primaryConstructorDescriptor
|
||||
null
|
||||
);
|
||||
for (JetConstructor constructor : classElement.getSecondaryConstructors()) {
|
||||
ConstructorDescriptorImpl functionDescriptor = resolveSecondaryConstructorDescriptor(memberDeclarations, classDescriptor, constructor);
|
||||
functionDescriptor.setReturnType(classDescriptor.getDefaultType());
|
||||
constructors.addFunction(functionDescriptor);
|
||||
}
|
||||
ConstructorDescriptorImpl primaryConstructorDescriptor = resolvePrimaryConstructorDescriptor(scope, classDescriptor, classElement);
|
||||
if (primaryConstructorDescriptor != null) {
|
||||
primaryConstructorDescriptor.setReturnType(classDescriptor.getDefaultType());
|
||||
constructors.addFunction(primaryConstructorDescriptor);
|
||||
classDescriptor.setPrimaryConstructor(primaryConstructorDescriptor);
|
||||
}
|
||||
return classDescriptor;
|
||||
}
|
||||
|
||||
public void resolveMutableClassDescriptor(@NotNull JetClass classElement, @NotNull MutableClassDescriptor descriptor) {
|
||||
@@ -616,18 +621,18 @@ public class ClassDescriptorResolver {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ConstructorDescriptor resolveSecondaryConstructorDescriptor(@NotNull JetScope scope, @NotNull ClassDescriptor classDescriptor, @NotNull JetConstructor constructor) {
|
||||
return createConstructorDescriptor(scope, classDescriptor, false, constructor.getModifierList(), constructor, constructor.getParameters());
|
||||
public ConstructorDescriptorImpl resolveSecondaryConstructorDescriptor(@NotNull JetScope scope, @NotNull ClassDescriptor classDescriptor, @NotNull JetConstructor constructor) {
|
||||
return createConstructorDescriptor(scope, classDescriptor, false, constructor.getModifierList(), constructor, classDescriptor.getTypeConstructor().getParameters(), constructor.getParameters());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private ConstructorDescriptor createConstructorDescriptor(
|
||||
private ConstructorDescriptorImpl createConstructorDescriptor(
|
||||
@NotNull JetScope scope,
|
||||
@NotNull ClassDescriptor classDescriptor,
|
||||
boolean isPrimary,
|
||||
@Nullable JetModifierList modifierList,
|
||||
@NotNull JetDeclaration declarationToTrace,
|
||||
@NotNull List<JetParameter> valueParameters) {
|
||||
List<TypeParameterDescriptor> typeParameters, @NotNull List<JetParameter> valueParameters) {
|
||||
ConstructorDescriptorImpl constructorDescriptor = new ConstructorDescriptorImpl(
|
||||
classDescriptor,
|
||||
AnnotationResolver.INSTANCE.resolveAnnotations(modifierList),
|
||||
@@ -635,6 +640,7 @@ public class ClassDescriptorResolver {
|
||||
);
|
||||
trace.recordDeclarationResolution(declarationToTrace, constructorDescriptor);
|
||||
return constructorDescriptor.initialize(
|
||||
typeParameters,
|
||||
resolveValueParameters(
|
||||
constructorDescriptor,
|
||||
new WritableScopeImpl(scope, classDescriptor, trace.getErrorHandler()),
|
||||
@@ -642,7 +648,7 @@ public class ClassDescriptorResolver {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ConstructorDescriptor resolvePrimaryConstructorDescriptor(@NotNull JetScope scope, @NotNull ClassDescriptor classDescriptor, @NotNull JetClass classElement) {
|
||||
public ConstructorDescriptorImpl resolvePrimaryConstructorDescriptor(@NotNull JetScope scope, @NotNull ClassDescriptor classDescriptor, @NotNull JetClass classElement) {
|
||||
if (!classElement.hasPrimaryConstructor()) return null;
|
||||
return createConstructorDescriptor(
|
||||
scope,
|
||||
@@ -650,7 +656,7 @@ public class ClassDescriptorResolver {
|
||||
true,
|
||||
classElement.getPrimaryConstructorModifierList(),
|
||||
classElement,
|
||||
classElement.getPrimaryConstructorParameters());
|
||||
classDescriptor.getTypeConstructor().getParameters(), classElement.getPrimaryConstructorParameters());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -227,7 +227,7 @@ public class TopDownAnalyzer {
|
||||
|
||||
private void createPrimaryConstructor(MutableClassDescriptor mutableClassDescriptor) {
|
||||
ConstructorDescriptorImpl constructorDescriptor = new ConstructorDescriptorImpl(mutableClassDescriptor, Collections.<Annotation>emptyList(), true);
|
||||
constructorDescriptor.initialize(Collections.<ValueParameterDescriptor>emptyList());
|
||||
constructorDescriptor.initialize(Collections.<TypeParameterDescriptor>emptyList(), Collections.<ValueParameterDescriptor>emptyList());
|
||||
// TODO : make the constructor private?
|
||||
mutableClassDescriptor.setPrimaryConstructor(constructorDescriptor);
|
||||
}
|
||||
|
||||
@@ -146,9 +146,30 @@ public class WritableScopeImpl extends WritableScopeWithImports {
|
||||
@NotNull
|
||||
public FunctionGroup getFunctionGroup(@NotNull String name) {
|
||||
FunctionGroup functionGroup = getFunctionGroups().get(name);
|
||||
FunctionGroup constructors = null;
|
||||
ClassifierDescriptor classifier = getClassifier(name);
|
||||
if (classifier instanceof ClassDescriptor) {
|
||||
ClassDescriptor classDescriptor = (ClassDescriptor) classifier;
|
||||
constructors = classDescriptor.getConstructors();
|
||||
}
|
||||
if (functionGroup != null && !functionGroup.isEmpty()) {
|
||||
if (constructors != null) {
|
||||
WritableFunctionGroup result = new WritableFunctionGroup(name);
|
||||
for (FunctionDescriptor functionDescriptor : functionGroup.getFunctionDescriptors()) {
|
||||
result.addFunction(functionDescriptor);
|
||||
}
|
||||
for (FunctionDescriptor functionDescriptor : constructors.getFunctionDescriptors()) {
|
||||
result.addFunction(functionDescriptor);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return functionGroup;
|
||||
}
|
||||
|
||||
if (constructors != null && !constructors.isEmpty()) {
|
||||
return constructors;
|
||||
}
|
||||
|
||||
// TODO : this logic is questionable
|
||||
functionGroup = getWorkerScope().getFunctionGroup(name);
|
||||
if (!functionGroup.isEmpty()) return functionGroup;
|
||||
|
||||
@@ -69,10 +69,11 @@ public class JavaClassDescriptor extends MutableDeclarationDescriptor implements
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionGroup getConstructors(List<TypeProjection> typeArguments) {
|
||||
assert typeArguments.size() == typeConstructor.getParameters().size();
|
||||
if (typeArguments.isEmpty()) return constructors;
|
||||
return new LazySubstitutingFunctionGroup(createTypeSubstitutor(typeArguments), constructors);
|
||||
public FunctionGroup getConstructors() {
|
||||
// assert typeArguments.size() == typeConstructor.getParameters().size();
|
||||
// if (typeArguments.isEmpty()) return constructors;
|
||||
// return new LazySubstitutingFunctionGroup(createTypeSubstitutor(typeArguments), constructors);
|
||||
return constructors;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -92,13 +92,14 @@ public class JavaDescriptorResolver {
|
||||
classDescriptor.setName(name);
|
||||
|
||||
List<JetType> supertypes = new ArrayList<JetType>();
|
||||
List<TypeParameterDescriptor> typeParameters = resolveTypeParameters(classDescriptor, psiClass.getTypeParameters());
|
||||
classDescriptor.setTypeConstructor(new TypeConstructorImpl(
|
||||
classDescriptor,
|
||||
Collections.<Annotation>emptyList(), // TODO
|
||||
// TODO
|
||||
psiClass.hasModifierProperty(PsiModifier.FINAL),
|
||||
name,
|
||||
resolveTypeParameters(classDescriptor, psiClass.getTypeParameters()),
|
||||
typeParameters,
|
||||
supertypes
|
||||
|
||||
));
|
||||
@@ -116,7 +117,7 @@ public class JavaDescriptorResolver {
|
||||
classDescriptor,
|
||||
Collections.<Annotation>emptyList(),
|
||||
false);
|
||||
constructorDescriptor.initialize(Collections.<ValueParameterDescriptor>emptyList());
|
||||
constructorDescriptor.initialize(typeParameters, Collections.<ValueParameterDescriptor>emptyList());
|
||||
constructorDescriptor.setReturnType(classDescriptor.getDefaultType());
|
||||
classDescriptor.addConstructor(constructorDescriptor);
|
||||
semanticServices.getTrace().recordDeclarationResolution(psiClass, constructorDescriptor);
|
||||
@@ -128,7 +129,7 @@ public class JavaDescriptorResolver {
|
||||
classDescriptor,
|
||||
Collections.<Annotation>emptyList(), // TODO
|
||||
false);
|
||||
constructorDescriptor.initialize(resolveParameterDescriptors(constructorDescriptor, constructor.getParameterList().getParameters()));
|
||||
constructorDescriptor.initialize(typeParameters, resolveParameterDescriptors(constructorDescriptor, constructor.getParameterList().getParameters()));
|
||||
constructorDescriptor.setReturnType(classDescriptor.getDefaultType());
|
||||
classDescriptor.addConstructor(constructorDescriptor);
|
||||
semanticServices.getTrace().recordDeclarationResolution(constructor, constructorDescriptor);
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package org.jetbrains.jet.lang.resolve.java;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.*;
|
||||
import org.jetbrains.jet.lang.resolve.JetScopeImpl;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassifierDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
|
||||
/**
|
||||
* @author abreslav
|
||||
@@ -31,6 +29,17 @@ public class JavaPackageScope extends JetScopeImpl {
|
||||
return semanticServices.getDescriptorResolver().resolveNamespace(getQualifiedName(name));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionGroup getFunctionGroup(@NotNull String name) {
|
||||
ClassifierDescriptor classifier = getClassifier(name);
|
||||
if (classifier instanceof ClassDescriptor) {
|
||||
ClassDescriptor classDescriptor = (ClassDescriptor) classifier;
|
||||
return classDescriptor.getConstructors();
|
||||
}
|
||||
return FunctionGroup.EMPTY;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public DeclarationDescriptor getContainingDeclaration() {
|
||||
|
||||
@@ -95,7 +95,7 @@ public class ErrorUtils {
|
||||
private static final ClassDescriptorImpl ERROR_CLASS = new ClassDescriptorImpl(ERROR_MODULE, Collections.<Annotation>emptyList(), "<ERROR CLASS>") {
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionGroup getConstructors(List<TypeProjection> typeArguments) {
|
||||
public FunctionGroup getConstructors() {
|
||||
return ERROR_FUNCTION_GROUP;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -553,7 +553,7 @@ public class JetTypeInferrer {
|
||||
projectionsStripped.add(typeArgument);
|
||||
}
|
||||
|
||||
FunctionGroup constructors = classDescriptor.getConstructors(projectionsStripped);
|
||||
FunctionGroup constructors = classDescriptor.getConstructors();
|
||||
OverloadDomain constructorsOverloadDomain = semanticServices.getOverloadResolver().getOverloadDomain(null, constructors);
|
||||
JetType constructorReturnedType = resolveCall(
|
||||
scope,
|
||||
@@ -1691,14 +1691,14 @@ public class JetTypeInferrer {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitNewExpression(JetNewExpression expression) {
|
||||
// TODO : type argument inference
|
||||
JetTypeReference typeReference = expression.getTypeReference();
|
||||
if (typeReference != null) {
|
||||
result = checkConstructorCall(scope, typeReference, expression);
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// public void visitNewExpression(JetNewExpression expression) {
|
||||
// // TODO : type argument inference
|
||||
// JetTypeReference typeReference = expression.getTypeReference();
|
||||
// if (typeReference != null) {
|
||||
// result = checkConstructorCall(scope, typeReference, expression);
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void visitHashQualifiedExpression(JetHashQualifiedExpression expression) {
|
||||
|
||||
@@ -177,7 +177,7 @@ public class TypeUtils {
|
||||
|
||||
@NotNull
|
||||
public static JetType makeUnsubstitutedType(ClassDescriptor classDescriptor, JetScope unsubstitutedMemberScope) {
|
||||
List<TypeProjection> arguments = getArguments(classDescriptor);
|
||||
List<TypeProjection> arguments = getDefaultArguments(classDescriptor.getTypeConstructor().getParameters());
|
||||
return new JetTypeImpl(
|
||||
Collections.<Annotation>emptyList(),
|
||||
classDescriptor.getTypeConstructor(),
|
||||
@@ -188,9 +188,9 @@ public class TypeUtils {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static List<TypeProjection> getArguments(@NotNull ClassDescriptor classDescriptor) {
|
||||
public static List<TypeProjection> getDefaultArguments(List<TypeParameterDescriptor> parameters) {
|
||||
List<TypeProjection> result = new ArrayList<TypeProjection>();
|
||||
for (TypeParameterDescriptor parameterDescriptor : classDescriptor.getTypeConstructor().getParameters()) {
|
||||
for (TypeParameterDescriptor parameterDescriptor : parameters) {
|
||||
result.add(new TypeProjection(parameterDescriptor.getDefaultType()));
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -114,7 +114,7 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}?
|
||||
<YYINITIAL> "var" { return JetTokens.VAR_KEYWORD ;}
|
||||
<YYINITIAL> "fun" { return JetTokens.FUN_KEYWORD ;}
|
||||
<YYINITIAL> "for" { return JetTokens.FOR_KEYWORD ;}
|
||||
<YYINITIAL> "new" { return JetTokens.NEW_KEYWORD ;}
|
||||
//<YYINITIAL> "new" { return JetTokens.NEW_KEYWORD ;}
|
||||
<YYINITIAL> "is" { return JetTokens.IS_KEYWORD ;}
|
||||
<YYINITIAL> "in" { return JetTokens.IN_KEYWORD ;}
|
||||
<YYINITIAL> "if" { return JetTokens.IF_KEYWORD ;}
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface JetTokens {
|
||||
JetKeywordToken FOR_KEYWORD = JetKeywordToken.keyword("for");
|
||||
JetKeywordToken NULL_KEYWORD = JetKeywordToken.keyword("null");
|
||||
JetKeywordToken TYPEOF_KEYWORD = JetKeywordToken.keyword("typeof");
|
||||
JetKeywordToken NEW_KEYWORD = JetKeywordToken.keyword("new");
|
||||
// JetKeywordToken NEW_KEYWORD = JetKeywordToken.keyword("new");
|
||||
JetKeywordToken TRUE_KEYWORD = JetKeywordToken.keyword("true");
|
||||
JetKeywordToken FALSE_KEYWORD = JetKeywordToken.keyword("false");
|
||||
JetKeywordToken IS_KEYWORD = JetKeywordToken.keyword("is");
|
||||
@@ -139,7 +139,9 @@ public interface JetTokens {
|
||||
|
||||
TokenSet KEYWORDS = TokenSet.create(NAMESPACE_KEYWORD, AS_KEYWORD, TYPE_KEYWORD, CLASS_KEYWORD,
|
||||
THIS_KEYWORD, VAL_KEYWORD, VAR_KEYWORD, FUN_KEYWORD, EXTENSION_KEYWORD, FOR_KEYWORD,
|
||||
NULL_KEYWORD, TYPEOF_KEYWORD, NEW_KEYWORD, TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD,
|
||||
NULL_KEYWORD, TYPEOF_KEYWORD,
|
||||
// NEW_KEYWORD,
|
||||
TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD,
|
||||
IN_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD, CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD,
|
||||
ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD, TRY_KEYWORD, WHEN_KEYWORD,
|
||||
NOT_IN, NOT_IS, CAPITALIZED_THIS_KEYWORD
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* The following code was generated by JFlex 1.4.3 on 4/8/11 3:38 PM */
|
||||
/* The following code was generated by JFlex 1.4.3 on 6/15/11 2:54 PM */
|
||||
|
||||
/* It's an automatically generated code. Do not modify it. */
|
||||
package org.jetbrains.jet.lexer;
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.jet.lexer.JetTokens;
|
||||
/**
|
||||
* This class is a scanner generated by
|
||||
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
|
||||
* on 4/8/11 3:38 PM from the specification file
|
||||
* on 6/15/11 2:54 PM from the specification file
|
||||
* <tt>/Users/abreslav/work/jet/idea/src/org/jetbrains/jet/lexer/Jet.flex</tt>
|
||||
*/
|
||||
class _JetLexer implements FlexLexer {
|
||||
@@ -145,21 +145,20 @@ class _JetLexer implements FlexLexer {
|
||||
"\1\23\1\24\1\25\1\26\1\27\1\30\1\31\1\32"+
|
||||
"\1\33\1\34\1\0\1\35\1\0\1\36\1\0\1\37"+
|
||||
"\1\0\1\40\1\41\1\42\1\43\1\44\1\35\2\2"+
|
||||
"\1\35\1\45\1\46\1\47\1\50\2\12\3\13\3\3"+
|
||||
"\1\35\1\45\1\46\1\47\1\50\2\12\3\13\2\3"+
|
||||
"\1\51\7\3\1\52\1\53\1\54\11\3\1\55\1\56"+
|
||||
"\1\57\1\0\1\60\1\61\1\62\1\63\1\64\1\65"+
|
||||
"\1\66\1\67\1\70\1\71\1\72\1\35\1\3\2\0"+
|
||||
"\1\42\1\73\4\0\1\13\1\74\1\3\1\75\1\3"+
|
||||
"\1\76\5\3\1\77\6\3\1\100\1\101\4\3\1\102"+
|
||||
"\1\103\1\104\1\105\1\106\1\107\1\36\1\37\1\0"+
|
||||
"\2\73\1\35\2\0\1\3\1\110\1\3\1\111\2\3"+
|
||||
"\1\112\1\113\1\114\5\3\1\115\1\3\1\116\1\42"+
|
||||
"\2\0\3\3\1\117\1\3\1\120\2\3\1\121\1\122"+
|
||||
"\1\123\1\74\3\3\1\124\1\125\1\126\5\3\1\127"+
|
||||
"\1\130\1\131";
|
||||
"\1\42\1\73\4\0\1\13\1\74\2\3\1\75\5\3"+
|
||||
"\1\76\6\3\1\77\1\100\4\3\1\101\1\102\1\103"+
|
||||
"\1\104\1\105\1\106\1\36\1\37\1\0\2\73\1\35"+
|
||||
"\2\0\1\3\1\107\1\3\1\110\2\3\1\111\1\112"+
|
||||
"\1\113\5\3\1\114\1\3\1\115\1\42\2\0\3\3"+
|
||||
"\1\116\1\3\1\117\2\3\1\120\1\121\1\122\1\74"+
|
||||
"\3\3\1\123\1\124\1\125\5\3\1\126\1\127\1\130";
|
||||
|
||||
private static int [] zzUnpackAction() {
|
||||
int [] result = new int[205];
|
||||
int [] result = new int[203];
|
||||
int offset = 0;
|
||||
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -194,25 +193,25 @@ class _JetLexer implements FlexLexer {
|
||||
"\0\u0b6d\0\u0bae\0\101\0\101\0\u0bef\0\u0c30\0\u0c71\0\u0cb2"+
|
||||
"\0\101\0\101\0\101\0\101\0\101\0\u0cf3\0\u0d34\0\u0d75"+
|
||||
"\0\u0db6\0\u0df7\0\u0e38\0\u0e79\0\u0eba\0\u0efb\0\u0f3c\0\u0f7d"+
|
||||
"\0\u0fbe\0\u0fff\0\u1040\0\u1081\0\303\0\303\0\303\0\u10c2"+
|
||||
"\0\u1103\0\u1144\0\u1185\0\u11c6\0\u1207\0\u1248\0\u1289\0\u12ca"+
|
||||
"\0\303\0\u130b\0\101\0\u134c\0\u138d\0\101\0\101\0\101"+
|
||||
"\0\101\0\101\0\101\0\101\0\101\0\101\0\101\0\u13ce"+
|
||||
"\0\101\0\u140f\0\u1450\0\u1491\0\u14d2\0\u1513\0\u1554\0\u1595"+
|
||||
"\0\u15d6\0\101\0\u1617\0\u1658\0\303\0\u1699\0\101\0\u16da"+
|
||||
"\0\u171b\0\u175c\0\u179d\0\u17de\0\303\0\u181f\0\u1860\0\u18a1"+
|
||||
"\0\u18e2\0\u1923\0\u1964\0\303\0\303\0\u19a5\0\u19e6\0\u1a27"+
|
||||
"\0\u1a68\0\303\0\303\0\101\0\101\0\101\0\101\0\101"+
|
||||
"\0\101\0\u1aa9\0\u1aea\0\101\0\u1b2b\0\u13ce\0\u1b6c\0\u1bad"+
|
||||
"\0\303\0\u1bee\0\303\0\u1c2f\0\u1c70\0\303\0\u1cb1\0\303"+
|
||||
"\0\u1cf2\0\u1d33\0\u1d74\0\u1db5\0\u1df6\0\303\0\u1e37\0\303"+
|
||||
"\0\101\0\u1e78\0\u1eb9\0\u1efa\0\u1f3b\0\u1f7c\0\303\0\u1fbd"+
|
||||
"\0\303\0\u1ffe\0\u203f\0\303\0\303\0\303\0\101\0\u2080"+
|
||||
"\0\u20c1\0\u2102\0\303\0\303\0\303\0\u2143\0\u2184\0\u21c5"+
|
||||
"\0\u2206\0\u2247\0\303\0\303\0\303";
|
||||
"\0\u0fbe\0\u0fff\0\u1040\0\303\0\303\0\303\0\u1081\0\u10c2"+
|
||||
"\0\u1103\0\u1144\0\u1185\0\u11c6\0\u1207\0\u1248\0\u1289\0\303"+
|
||||
"\0\u12ca\0\101\0\u130b\0\u134c\0\101\0\101\0\101\0\101"+
|
||||
"\0\101\0\101\0\101\0\101\0\101\0\101\0\u138d\0\101"+
|
||||
"\0\u13ce\0\u140f\0\u1450\0\u1491\0\u14d2\0\u1513\0\u1554\0\u1595"+
|
||||
"\0\101\0\u15d6\0\u1617\0\u1658\0\101\0\u1699\0\u16da\0\u171b"+
|
||||
"\0\u175c\0\u179d\0\303\0\u17de\0\u181f\0\u1860\0\u18a1\0\u18e2"+
|
||||
"\0\u1923\0\303\0\303\0\u1964\0\u19a5\0\u19e6\0\u1a27\0\303"+
|
||||
"\0\303\0\101\0\101\0\101\0\101\0\101\0\101\0\u1a68"+
|
||||
"\0\u1aa9\0\101\0\u1aea\0\u138d\0\u1b2b\0\u1b6c\0\303\0\u1bad"+
|
||||
"\0\303\0\u1bee\0\u1c2f\0\303\0\u1c70\0\303\0\u1cb1\0\u1cf2"+
|
||||
"\0\u1d33\0\u1d74\0\u1db5\0\303\0\u1df6\0\303\0\101\0\u1e37"+
|
||||
"\0\u1e78\0\u1eb9\0\u1efa\0\u1f3b\0\303\0\u1f7c\0\303\0\u1fbd"+
|
||||
"\0\u1ffe\0\303\0\303\0\303\0\101\0\u203f\0\u2080\0\u20c1"+
|
||||
"\0\303\0\303\0\303\0\u2102\0\u2143\0\u2184\0\u21c5\0\u2206"+
|
||||
"\0\303\0\303\0\303";
|
||||
|
||||
private static int [] zzUnpackRowMap() {
|
||||
int [] result = new int[205];
|
||||
int [] result = new int[203];
|
||||
int offset = 0;
|
||||
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -259,200 +258,198 @@ class _JetLexer implements FlexLexer {
|
||||
"\15\0\13\16\1\0\7\16\1\105\1\106\54\16\13\107"+
|
||||
"\1\0\10\107\1\110\1\111\53\107\1\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\1\4\1\112\1\4\1\113\7\4\1\114"+
|
||||
"\14\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\4\4\1\115"+
|
||||
"\23\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\7\4\1\116"+
|
||||
"\13\4\1\117\4\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\3\0\1\4\1\112\11\4\1\113\14\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\4\4\1\114\23\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\7\4\1\115\13\4\1\116"+
|
||||
"\4\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\12\4\1\117"+
|
||||
"\10\4\1\120\4\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\12\4\1\120\10\4\1\121\4\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\14\4\1\122\1\123\4\4\1\124\5\4"+
|
||||
"\24\0\2\4\1\0\2\4\1\0\1\4\4\0\3\4"+
|
||||
"\1\0\1\4\1\0\1\4\3\0\1\125\3\4\1\126"+
|
||||
"\11\4\1\127\11\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\14\4\1\121\1\122\4\4\1\123\5\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\1\124\3\4\1\125\11\4\1\126"+
|
||||
"\11\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\17\4\1\127"+
|
||||
"\10\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\3\4\1\130"+
|
||||
"\24\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\1\4\1\131"+
|
||||
"\10\4\1\132\1\133\14\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\14\4\1\134\13\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\22\4\1\135\5\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\22\4\1\136\5\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\1\4\1\137\26\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\12\4\1\140\15\4\101\0\1\141\4\0\1\142"+
|
||||
"\54\0\1\143\16\0\1\144\41\0\1\145\46\0\1\146"+
|
||||
"\70\0\1\147\2\0\1\150\75\0\1\151\100\0\1\152"+
|
||||
"\106\0\1\153\101\0\1\154\71\0\1\155\23\0\1\100"+
|
||||
"\12\0\1\100\2\0\1\156\62\0\1\157\12\0\1\157"+
|
||||
"\4\0\1\157\37\0\1\157\20\0\2\63\1\0\2\63"+
|
||||
"\1\160\1\63\4\0\3\63\1\0\1\63\1\0\1\63"+
|
||||
"\3\0\30\63\24\0\2\64\1\0\2\64\1\0\1\64"+
|
||||
"\4\0\3\64\1\0\1\64\1\0\1\64\3\0\30\64"+
|
||||
"\25\0\1\161\1\0\1\161\2\0\1\161\5\0\2\161"+
|
||||
"\1\0\1\161\1\0\1\161\3\0\30\161\24\0\2\66"+
|
||||
"\1\0\2\66\1\0\1\66\4\0\3\66\1\0\1\66"+
|
||||
"\1\0\1\66\3\0\30\66\25\0\1\162\1\0\1\162"+
|
||||
"\2\0\1\162\5\0\2\162\1\0\1\162\1\0\1\162"+
|
||||
"\3\0\30\162\23\0\13\71\1\0\65\71\12\163\1\164"+
|
||||
"\66\163\1\0\1\75\12\0\1\75\2\0\1\165\1\62"+
|
||||
"\10\0\1\62\50\0\2\76\11\0\1\76\1\0\1\76"+
|
||||
"\1\166\1\76\1\0\1\167\4\0\1\76\1\0\1\76"+
|
||||
"\1\0\1\167\1\76\7\0\2\76\7\0\1\76\24\0"+
|
||||
"\1\77\12\0\1\77\2\0\1\170\62\0\1\100\12\0"+
|
||||
"\1\100\3\0\1\62\10\0\1\62\47\0\13\16\1\0"+
|
||||
"\65\16\13\107\1\0\10\107\1\110\1\171\66\107\1\0"+
|
||||
"\65\107\25\0\1\172\54\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\17\4\1\130\10\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\2\4\1\173\25\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\3\4\1\131\24\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\23\4\1\174\4\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\1\4\1\132\10\4\1\133\1\134\14\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\14\4\1\135\13\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\22\4\1\136\5\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\22\4\1\137\5\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\1\4\1\140\26\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\12\4\1\141\15\4\101\0\1\142"+
|
||||
"\4\0\1\143\54\0\1\144\16\0\1\145\41\0\1\146"+
|
||||
"\46\0\1\147\70\0\1\150\2\0\1\151\75\0\1\152"+
|
||||
"\100\0\1\153\106\0\1\154\101\0\1\155\71\0\1\156"+
|
||||
"\23\0\1\100\12\0\1\100\2\0\1\157\62\0\1\160"+
|
||||
"\12\0\1\160\4\0\1\160\37\0\1\160\20\0\2\63"+
|
||||
"\1\0\2\63\1\161\1\63\4\0\3\63\1\0\1\63"+
|
||||
"\1\0\1\63\3\0\30\63\24\0\2\64\1\0\2\64"+
|
||||
"\1\0\1\64\4\0\3\64\1\0\1\64\1\0\1\64"+
|
||||
"\3\0\30\64\25\0\1\162\1\0\1\162\2\0\1\162"+
|
||||
"\5\0\2\162\1\0\1\162\1\0\1\162\3\0\30\162"+
|
||||
"\24\0\2\66\1\0\2\66\1\0\1\66\4\0\3\66"+
|
||||
"\1\0\1\66\1\0\1\66\3\0\30\66\25\0\1\163"+
|
||||
"\1\0\1\163\2\0\1\163\5\0\2\163\1\0\1\163"+
|
||||
"\1\0\1\163\3\0\30\163\23\0\13\71\1\0\65\71"+
|
||||
"\12\164\1\165\66\164\1\0\1\75\12\0\1\75\2\0"+
|
||||
"\1\166\1\62\10\0\1\62\50\0\2\76\11\0\1\76"+
|
||||
"\1\0\1\76\1\167\1\76\1\0\1\170\4\0\1\76"+
|
||||
"\1\0\1\76\1\0\1\170\1\76\7\0\2\76\7\0"+
|
||||
"\1\76\24\0\1\77\12\0\1\77\2\0\1\171\62\0"+
|
||||
"\1\100\12\0\1\100\3\0\1\62\10\0\1\62\47\0"+
|
||||
"\13\16\1\0\65\16\13\107\1\0\10\107\1\110\1\172"+
|
||||
"\66\107\1\0\65\107\25\0\1\173\54\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\2\4\1\174\25\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\21\4\1\175\6\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\23\4\1\176\4\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\30\4\2\0\1\177\21\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\10\4\1\200\17\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\4\4\1\201\23\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\1\202\27\4\24\0\2\4\1\0\2\4"+
|
||||
"\30\4\2\0\1\175\21\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\10\4\1\176\17\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\4\4\1\177\23\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\1\200\27\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\1\4"+
|
||||
"\1\201\26\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\13\4"+
|
||||
"\1\202\1\4\1\203\12\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\1\4\1\203\26\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\5\4\1\204\22\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\13\4\1\204\1\4\1\205\12\4\24\0\2\4"+
|
||||
"\3\0\11\4\1\205\2\4\1\206\13\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\5\4\1\206\22\4\24\0\2\4"+
|
||||
"\1\0\1\4\3\0\20\4\1\207\7\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\11\4\1\207\2\4\1\210\13\4"+
|
||||
"\24\0\2\4\1\0\2\4\1\0\1\4\4\0\3\4"+
|
||||
"\1\0\1\4\1\0\1\4\3\0\20\4\1\211\7\4"+
|
||||
"\24\0\2\4\1\0\2\4\1\0\1\4\4\0\3\4"+
|
||||
"\1\0\1\4\1\0\1\4\3\0\10\4\1\212\17\4"+
|
||||
"\24\0\2\4\1\0\2\4\1\0\1\4\4\0\3\4"+
|
||||
"\1\0\1\4\1\0\1\4\3\0\23\4\1\213\4\4"+
|
||||
"\24\0\2\4\1\0\2\4\1\0\1\4\4\0\3\4"+
|
||||
"\1\0\1\4\1\0\1\4\3\0\14\4\1\214\13\4"+
|
||||
"\24\0\2\4\1\0\2\4\1\0\1\4\4\0\3\4"+
|
||||
"\1\0\1\4\1\0\1\4\3\0\1\215\27\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\216\24\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\217\5\4\1\220"+
|
||||
"\16\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\11\4\1\221"+
|
||||
"\16\4\24\0\2\4\1\0\2\4\1\0\1\4\4\0"+
|
||||
"\3\4\1\0\1\4\1\0\1\4\3\0\14\4\1\222"+
|
||||
"\6\4\1\223\4\4\101\0\1\224\50\0\1\225\3\0"+
|
||||
"\1\226\124\0\1\227\23\0\1\160\12\0\1\160\65\0"+
|
||||
"\2\162\1\0\2\162\1\230\1\162\4\0\3\162\1\0"+
|
||||
"\1\162\1\0\1\162\3\0\30\162\24\0\2\163\1\0"+
|
||||
"\2\163\1\231\1\163\4\0\3\163\1\0\1\163\1\0"+
|
||||
"\1\163\3\0\30\163\23\0\12\164\1\232\66\164\11\233"+
|
||||
"\1\234\1\165\66\233\1\0\1\100\12\0\1\100\65\0"+
|
||||
"\2\235\11\0\1\235\1\0\1\235\1\157\1\235\6\0"+
|
||||
"\1\235\1\0\1\235\2\0\1\235\7\0\2\235\7\0"+
|
||||
"\1\235\24\0\1\160\12\0\1\160\4\0\1\236\37\0"+
|
||||
"\1\236\36\0\1\157\61\0\25\173\1\237\53\173\1\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\240\24\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\23\4\1\241\4\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\242\24\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\243\24\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\10\4\1\244\17\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\4\4\1\245\23\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\246\24\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\247\24\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\4\4\1\250\23\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\12\4\1\251\15\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\3\4\1\252\24\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\13\4\1\253\14\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\4\4\1\254\23\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\1\4\1\255\26\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\1\256\27\4\24\0\2\4"+
|
||||
"\1\0\1\4\3\0\10\4\1\210\17\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\23\4\1\257\4\4\24\0\2\4"+
|
||||
"\1\0\1\4\3\0\23\4\1\211\4\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\4\4\1\260\23\4\23\0\11\164"+
|
||||
"\1\261\1\232\66\164\12\233\1\262\66\233\1\0\2\235"+
|
||||
"\11\0\1\235\1\0\1\235\1\0\1\235\1\0\1\170"+
|
||||
"\4\0\1\235\1\0\1\235\1\0\1\170\1\235\7\0"+
|
||||
"\2\235\7\0\1\235\23\0\25\173\1\263\53\173\1\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\4\4\1\264\23\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\1\265\27\4\24\0\2\4"+
|
||||
"\1\0\1\4\3\0\14\4\1\212\13\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\11\4\1\266\16\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\4\4\1\267\23\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\12\4\1\270\15\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\21\4\1\271\6\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\6\4\1\272\21\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\14\4\1\273\13\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\3\4\1\274\24\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\24\4\1\275\3\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\3\4\1\276\24\4\23\0\11\233"+
|
||||
"\1\234\1\262\66\233\25\173\1\277\53\173\1\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\5\4\1\300\22\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\4\4\1\301\23\4\24\0\2\4"+
|
||||
"\1\0\2\4\1\0\1\4\4\0\3\4\1\0\1\4"+
|
||||
"\1\0\1\4\3\0\1\302\27\4\24\0\2\4\1\0"+
|
||||
"\1\0\1\4\3\0\1\213\27\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\16\4\1\303\11\4\24\0\2\4\1\0"+
|
||||
"\1\4\3\0\3\4\1\214\24\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\10\4\1\304\17\4\24\0\2\4\1\0"+
|
||||
"\1\4\3\0\3\4\1\215\5\4\1\216\16\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\11\4\1\217\16\4\24\0"+
|
||||
"\2\4\1\0\2\4\1\0\1\4\4\0\3\4\1\0"+
|
||||
"\1\4\1\0\1\4\3\0\14\4\1\220\6\4\1\221"+
|
||||
"\4\4\101\0\1\222\50\0\1\223\3\0\1\224\124\0"+
|
||||
"\1\225\23\0\1\157\12\0\1\157\65\0\2\161\1\0"+
|
||||
"\2\161\1\226\1\161\4\0\3\161\1\0\1\161\1\0"+
|
||||
"\1\161\3\0\30\161\24\0\2\162\1\0\2\162\1\227"+
|
||||
"\1\162\4\0\3\162\1\0\1\162\1\0\1\162\3\0"+
|
||||
"\30\162\23\0\12\163\1\230\66\163\11\231\1\232\1\164"+
|
||||
"\66\231\1\0\1\100\12\0\1\100\65\0\2\233\11\0"+
|
||||
"\1\233\1\0\1\233\1\156\1\233\6\0\1\233\1\0"+
|
||||
"\1\233\2\0\1\233\7\0\2\233\7\0\1\233\24\0"+
|
||||
"\1\157\12\0\1\157\4\0\1\234\37\0\1\234\36\0"+
|
||||
"\1\156\61\0\25\172\1\235\53\172\1\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\1\305\27\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\4\3\0\3\4\1\236\24\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\23\4\1\237\4\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\3\4\1\240\24\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\3\4\1\241\24\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\10\4\1\242\17\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\4\4\1\243\23\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\3\4\1\244\24\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\3\4\1\245\24\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\4\4\1\246\23\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\12\4\1\247\15\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\3\4\1\250\24\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\13\4\1\251\14\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\4\4\1\252\23\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\1\4\1\253\26\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\1\254\27\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\1\4\1\306\26\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\23\4\1\255\4\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\11\4\1\307\16\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\4\4\1\256\23\4\23\0\11\163\1\257\1\230"+
|
||||
"\66\163\12\231\1\260\66\231\1\0\2\233\11\0\1\233"+
|
||||
"\1\0\1\233\1\0\1\233\1\0\1\167\4\0\1\233"+
|
||||
"\1\0\1\233\1\0\1\167\1\233\7\0\2\233\7\0"+
|
||||
"\1\233\23\0\25\172\1\261\53\172\1\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\4\4\1\262\23\4\24\0\2\4\1\0"+
|
||||
"\2\4\1\0\1\4\4\0\3\4\1\0\1\4\1\0"+
|
||||
"\1\4\3\0\1\263\27\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\13\4\1\310\14\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\11\4\1\264\16\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\6\4\1\311\21\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\4\4\1\265\23\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\12\4\1\312\15\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\12\4\1\266\15\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\3\4\1\313\24\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\21\4\1\267\6\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\3\4\1\314\24\4\24\0\2\4\1\0\2\4"+
|
||||
"\3\0\6\4\1\270\21\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\1\315\27\4\23\0";
|
||||
"\3\0\14\4\1\271\13\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\3\4\1\272\24\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\24\4\1\273\3\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\3\4\1\274\24\4\23\0\11\231\1\232\1\260"+
|
||||
"\66\231\25\172\1\275\53\172\1\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\5\4\1\276\22\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\4\4\1\277\23\4\24\0\2\4\1\0\2\4"+
|
||||
"\1\0\1\4\4\0\3\4\1\0\1\4\1\0\1\4"+
|
||||
"\3\0\1\300\27\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\16\4\1\301\11\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\10\4\1\302\17\4\24\0\2\4\1\0\2\4\1\0"+
|
||||
"\1\4\4\0\3\4\1\0\1\4\1\0\1\4\3\0"+
|
||||
"\1\303\27\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\1\4"+
|
||||
"\1\304\26\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\11\4"+
|
||||
"\1\305\16\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\13\4"+
|
||||
"\1\306\14\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\6\4"+
|
||||
"\1\307\21\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\12\4"+
|
||||
"\1\310\15\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\3\4"+
|
||||
"\1\311\24\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\3\4"+
|
||||
"\1\312\24\4\24\0\2\4\1\0\2\4\1\0\1\4"+
|
||||
"\4\0\3\4\1\0\1\4\1\0\1\4\3\0\1\313"+
|
||||
"\27\4\23\0";
|
||||
|
||||
private static int [] zzUnpackTrans() {
|
||||
int [] result = new int[8840];
|
||||
int [] result = new int[8775];
|
||||
int offset = 0;
|
||||
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -495,13 +492,13 @@ class _JetLexer implements FlexLexer {
|
||||
private static final String ZZ_ATTRIBUTE_PACKED_0 =
|
||||
"\1\0\1\11\43\1\1\11\1\1\11\11\1\0\1\1"+
|
||||
"\1\0\1\1\1\0\1\1\1\0\1\11\2\1\2\11"+
|
||||
"\4\1\5\11\35\1\1\11\1\0\1\1\12\11\1\1"+
|
||||
"\1\11\2\0\2\1\4\0\1\11\4\1\1\11\24\1"+
|
||||
"\4\1\5\11\34\1\1\11\1\0\1\1\12\11\1\1"+
|
||||
"\1\11\2\0\2\1\4\0\1\11\3\1\1\11\24\1"+
|
||||
"\6\11\1\0\1\1\1\11\1\1\2\0\21\1\1\11"+
|
||||
"\2\0\13\1\1\11\16\1";
|
||||
|
||||
private static int [] zzUnpackAttribute() {
|
||||
int [] result = new int[205];
|
||||
int [] result = new int[203];
|
||||
int offset = 0;
|
||||
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -809,359 +806,355 @@ class _JetLexer implements FlexLexer {
|
||||
case 3:
|
||||
{ return JetTokens.IDENTIFIER;
|
||||
}
|
||||
case 90: break;
|
||||
case 64:
|
||||
case 89: break;
|
||||
case 63:
|
||||
{ return JetTokens.FOR_KEYWORD ;
|
||||
}
|
||||
case 91: break;
|
||||
case 86:
|
||||
case 90: break;
|
||||
case 85:
|
||||
{ return JetTokens.RETURN_KEYWORD ;
|
||||
}
|
||||
case 92: break;
|
||||
case 72:
|
||||
case 91: break;
|
||||
case 71:
|
||||
{ return JetTokens.NULL_KEYWORD ;
|
||||
}
|
||||
case 93: break;
|
||||
case 92: break;
|
||||
case 16:
|
||||
{ return JetTokens.LT ;
|
||||
}
|
||||
case 94: break;
|
||||
case 93: break;
|
||||
case 45:
|
||||
{ return JetTokens.DO_KEYWORD ;
|
||||
}
|
||||
case 95: break;
|
||||
case 94: break;
|
||||
case 15:
|
||||
{ return JetTokens.PLUS ;
|
||||
}
|
||||
case 96: break;
|
||||
case 95: break;
|
||||
case 60:
|
||||
{ return JetTokens.RAW_STRING_LITERAL;
|
||||
}
|
||||
case 97: break;
|
||||
case 96: break;
|
||||
case 51:
|
||||
{ return JetTokens.PLUSEQ ;
|
||||
}
|
||||
case 98: break;
|
||||
case 97: break;
|
||||
case 27:
|
||||
{ return JetTokens.COMMA ;
|
||||
}
|
||||
case 99: break;
|
||||
case 98: break;
|
||||
case 17:
|
||||
{ return JetTokens.GT ;
|
||||
}
|
||||
case 100: break;
|
||||
case 99: break;
|
||||
case 4:
|
||||
{ return JetTokens.WHITE_SPACE;
|
||||
}
|
||||
case 101: break;
|
||||
case 84:
|
||||
case 100: break;
|
||||
case 83:
|
||||
{ return JetTokens.TYPEOF_KEYWORD ;
|
||||
}
|
||||
case 102: break;
|
||||
case 101: break;
|
||||
case 25:
|
||||
{ return JetTokens.RPAR ;
|
||||
}
|
||||
case 103: break;
|
||||
case 102: break;
|
||||
case 47:
|
||||
{ return JetTokens.DOUBLE_ARROW;
|
||||
}
|
||||
case 104: break;
|
||||
case 74:
|
||||
case 103: break;
|
||||
case 73:
|
||||
{ return JetTokens.TRUE_KEYWORD ;
|
||||
}
|
||||
case 105: break;
|
||||
case 104: break;
|
||||
case 30:
|
||||
{ return JetTokens.FIELD_IDENTIFIER;
|
||||
}
|
||||
case 106: break;
|
||||
case 105: break;
|
||||
case 55:
|
||||
{ return JetTokens.ANDAND ;
|
||||
}
|
||||
case 107: break;
|
||||
case 106: break;
|
||||
case 59:
|
||||
{ return JetTokens.DOC_COMMENT;
|
||||
}
|
||||
case 108: break;
|
||||
case 107: break;
|
||||
case 29:
|
||||
{ return JetTokens.FLOAT_LITERAL;
|
||||
}
|
||||
case 109: break;
|
||||
case 108: break;
|
||||
case 33:
|
||||
{ return JetTokens.EOL_COMMENT;
|
||||
}
|
||||
case 110: break;
|
||||
case 77:
|
||||
case 109: break;
|
||||
case 76:
|
||||
{ return JetTokens.WHEN_KEYWORD ;
|
||||
}
|
||||
case 111: break;
|
||||
case 110: break;
|
||||
case 18:
|
||||
{ return JetTokens.COLON ;
|
||||
}
|
||||
case 112: break;
|
||||
case 111: break;
|
||||
case 53:
|
||||
{ return JetTokens.LTEQ ;
|
||||
}
|
||||
case 113: break;
|
||||
case 112: break;
|
||||
case 40:
|
||||
{ return JetTokens.ARROW ;
|
||||
}
|
||||
case 114: break;
|
||||
case 113: break;
|
||||
case 20:
|
||||
{ return JetTokens.LBRACKET ;
|
||||
}
|
||||
case 115: break;
|
||||
case 114: break;
|
||||
case 58:
|
||||
{ yypushback(2); return JetTokens.INTEGER_LITERAL;
|
||||
}
|
||||
case 116: break;
|
||||
case 115: break;
|
||||
case 10:
|
||||
{ return JetTokens.CHARACTER_LITERAL;
|
||||
}
|
||||
case 117: break;
|
||||
case 66:
|
||||
case 116: break;
|
||||
case 65:
|
||||
{ return JetTokens.VAR_KEYWORD ;
|
||||
}
|
||||
case 118: break;
|
||||
case 117: break;
|
||||
case 54:
|
||||
{ return JetTokens.GTEQ ;
|
||||
}
|
||||
case 119: break;
|
||||
case 118: break;
|
||||
case 2:
|
||||
{ return JetTokens.INTEGER_LITERAL;
|
||||
}
|
||||
case 120: break;
|
||||
case 119: break;
|
||||
case 23:
|
||||
{ return JetTokens.RBRACE ;
|
||||
}
|
||||
case 121: break;
|
||||
case 79:
|
||||
case 120: break;
|
||||
case 78:
|
||||
{ return JetTokens.CLASS_KEYWORD ;
|
||||
}
|
||||
case 122: break;
|
||||
case 121: break;
|
||||
case 13:
|
||||
{ return JetTokens.EXCL ;
|
||||
}
|
||||
case 123: break;
|
||||
case 63:
|
||||
case 122: break;
|
||||
case 62:
|
||||
{ return JetTokens.TRY_KEYWORD ;
|
||||
}
|
||||
case 124: break;
|
||||
case 123: break;
|
||||
case 48:
|
||||
{ return JetTokens.EXCLEQ ;
|
||||
}
|
||||
case 125: break;
|
||||
case 124: break;
|
||||
case 39:
|
||||
{ return JetTokens.MINUSEQ ;
|
||||
}
|
||||
case 126: break;
|
||||
case 80:
|
||||
case 125: break;
|
||||
case 79:
|
||||
{ return JetTokens.THROW_KEYWORD ;
|
||||
}
|
||||
case 127: break;
|
||||
case 83:
|
||||
case 126: break;
|
||||
case 82:
|
||||
{ return JetTokens.WHILE_KEYWORD ;
|
||||
}
|
||||
case 128: break;
|
||||
case 127: break;
|
||||
case 38:
|
||||
{ return JetTokens.MINUSMINUS;
|
||||
}
|
||||
case 129: break;
|
||||
case 87:
|
||||
case 128: break;
|
||||
case 86:
|
||||
{ return JetTokens.CONTINUE_KEYWORD ;
|
||||
}
|
||||
case 130: break;
|
||||
case 129: break;
|
||||
case 32:
|
||||
{ return JetTokens.ATAT ;
|
||||
}
|
||||
case 131: break;
|
||||
case 69:
|
||||
case 130: break;
|
||||
case 68:
|
||||
{ return JetTokens.NOT_IN;
|
||||
}
|
||||
case 132: break;
|
||||
case 131: break;
|
||||
case 6:
|
||||
{ return JetTokens.DIV ;
|
||||
}
|
||||
case 133: break;
|
||||
case 132: break;
|
||||
case 50:
|
||||
{ return JetTokens.ELVIS ;
|
||||
}
|
||||
case 134: break;
|
||||
case 133: break;
|
||||
case 31:
|
||||
{ return JetTokens.LABEL_IDENTIFIER;
|
||||
}
|
||||
case 135: break;
|
||||
case 134: break;
|
||||
case 14:
|
||||
{ return JetTokens.QUEST ;
|
||||
}
|
||||
case 136: break;
|
||||
case 135: break;
|
||||
case 56:
|
||||
{ return JetTokens.OROR ;
|
||||
}
|
||||
case 137: break;
|
||||
case 136: break;
|
||||
case 19:
|
||||
{ return JetTokens.PERC ;
|
||||
}
|
||||
case 138: break;
|
||||
case 71:
|
||||
case 137: break;
|
||||
case 70:
|
||||
{ return JetTokens.EXCLEQEQEQ;
|
||||
}
|
||||
case 139: break;
|
||||
case 138: break;
|
||||
case 57:
|
||||
{ return JetTokens.PERCEQ ;
|
||||
}
|
||||
case 140: break;
|
||||
case 139: break;
|
||||
case 37:
|
||||
{ return JetTokens.RANGE ;
|
||||
}
|
||||
case 141: break;
|
||||
case 140: break;
|
||||
case 1:
|
||||
{ return TokenType.BAD_CHARACTER;
|
||||
}
|
||||
case 142: break;
|
||||
case 141: break;
|
||||
case 49:
|
||||
{ return JetTokens.SAFE_ACCESS;
|
||||
}
|
||||
case 143: break;
|
||||
case 88:
|
||||
case 142: break;
|
||||
case 87:
|
||||
{ return JetTokens.NAMESPACE_KEYWORD ;
|
||||
}
|
||||
case 144: break;
|
||||
case 70:
|
||||
case 143: break;
|
||||
case 69:
|
||||
{ return JetTokens.NOT_IS;
|
||||
}
|
||||
case 145: break;
|
||||
case 144: break;
|
||||
case 7:
|
||||
{ return JetTokens.MUL ;
|
||||
}
|
||||
case 146: break;
|
||||
case 145: break;
|
||||
case 21:
|
||||
{ return JetTokens.RBRACKET ;
|
||||
}
|
||||
case 147: break;
|
||||
case 146: break;
|
||||
case 52:
|
||||
{ return JetTokens.PLUSPLUS ;
|
||||
}
|
||||
case 148: break;
|
||||
case 76:
|
||||
case 147: break;
|
||||
case 75:
|
||||
{ return JetTokens.THIS_KEYWORD ;
|
||||
}
|
||||
case 149: break;
|
||||
case 148: break;
|
||||
case 8:
|
||||
{ return JetTokens.DOT ;
|
||||
}
|
||||
case 150: break;
|
||||
case 149: break;
|
||||
case 26:
|
||||
{ return JetTokens.SEMICOLON ;
|
||||
}
|
||||
case 151: break;
|
||||
case 150: break;
|
||||
case 44:
|
||||
{ return JetTokens.IF_KEYWORD ;
|
||||
}
|
||||
case 152: break;
|
||||
case 151: break;
|
||||
case 12:
|
||||
{ return JetTokens.EQ ;
|
||||
}
|
||||
case 153: break;
|
||||
case 152: break;
|
||||
case 5:
|
||||
{ return JetTokens.AT ;
|
||||
}
|
||||
case 154: break;
|
||||
case 62:
|
||||
case 153: break;
|
||||
case 61:
|
||||
{ return JetTokens.AS_SAFE;
|
||||
}
|
||||
case 155: break;
|
||||
case 154: break;
|
||||
case 24:
|
||||
{ return JetTokens.LPAR ;
|
||||
}
|
||||
case 156: break;
|
||||
case 155: break;
|
||||
case 9:
|
||||
{ return JetTokens.MINUS ;
|
||||
}
|
||||
case 157: break;
|
||||
case 81:
|
||||
case 156: break;
|
||||
case 80:
|
||||
{ return JetTokens.FALSE_KEYWORD ;
|
||||
}
|
||||
case 158: break;
|
||||
case 75:
|
||||
case 157: break;
|
||||
case 74:
|
||||
{ return JetTokens.TYPE_KEYWORD ;
|
||||
}
|
||||
case 159: break;
|
||||
case 65:
|
||||
case 158: break;
|
||||
case 64:
|
||||
{ return JetTokens.FUN_KEYWORD ;
|
||||
}
|
||||
case 160: break;
|
||||
case 159: break;
|
||||
case 43:
|
||||
{ return JetTokens.IS_KEYWORD ;
|
||||
}
|
||||
case 161: break;
|
||||
case 160: break;
|
||||
case 35:
|
||||
{ return JetTokens.DIVEQ ;
|
||||
}
|
||||
case 162: break;
|
||||
case 89:
|
||||
case 161: break;
|
||||
case 88:
|
||||
{ return JetTokens.EXTENSION_KEYWORD ;
|
||||
}
|
||||
case 163: break;
|
||||
case 73:
|
||||
case 162: break;
|
||||
case 72:
|
||||
{ return JetTokens.ELSE_KEYWORD ;
|
||||
}
|
||||
case 164: break;
|
||||
case 163: break;
|
||||
case 41:
|
||||
{ return JetTokens.AS_KEYWORD ;
|
||||
}
|
||||
case 165: break;
|
||||
case 164: break;
|
||||
case 42:
|
||||
{ return JetTokens.IN_KEYWORD ;
|
||||
}
|
||||
case 166: break;
|
||||
case 165: break;
|
||||
case 46:
|
||||
{ return JetTokens.EQEQ ;
|
||||
}
|
||||
case 167: break;
|
||||
case 67:
|
||||
case 166: break;
|
||||
case 66:
|
||||
{ return JetTokens.VAL_KEYWORD ;
|
||||
}
|
||||
case 168: break;
|
||||
case 68:
|
||||
case 167: break;
|
||||
case 67:
|
||||
{ return JetTokens.EQEQEQ ;
|
||||
}
|
||||
case 169: break;
|
||||
case 78:
|
||||
case 168: break;
|
||||
case 77:
|
||||
{ return JetTokens.CAPITALIZED_THIS_KEYWORD ;
|
||||
}
|
||||
case 170: break;
|
||||
case 61:
|
||||
{ return JetTokens.NEW_KEYWORD ;
|
||||
}
|
||||
case 171: break;
|
||||
case 169: break;
|
||||
case 36:
|
||||
{ return JetTokens.MULTEQ ;
|
||||
}
|
||||
case 172: break;
|
||||
case 170: break;
|
||||
case 11:
|
||||
{ return JetTokens.STRING_LITERAL;
|
||||
}
|
||||
case 173: break;
|
||||
case 171: break;
|
||||
case 22:
|
||||
{ return JetTokens.LBRACE ;
|
||||
}
|
||||
case 174: break;
|
||||
case 85:
|
||||
case 172: break;
|
||||
case 84:
|
||||
{ return JetTokens.OBJECT_KEYWORD ;
|
||||
}
|
||||
case 175: break;
|
||||
case 82:
|
||||
case 173: break;
|
||||
case 81:
|
||||
{ return JetTokens.BREAK_KEYWORD ;
|
||||
}
|
||||
case 176: break;
|
||||
case 174: break;
|
||||
case 34:
|
||||
{ return JetTokens.BLOCK_COMMENT;
|
||||
}
|
||||
case 177: break;
|
||||
case 175: break;
|
||||
case 28:
|
||||
{ return JetTokens.HASH ;
|
||||
}
|
||||
case 178: break;
|
||||
case 176: break;
|
||||
default:
|
||||
if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
|
||||
zzAtEOF = true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
== foo ==
|
||||
fun foo() {
|
||||
val a = new Array<Int>
|
||||
val a = Array<Int>
|
||||
3
|
||||
a[10] = 4
|
||||
2
|
||||
@@ -11,7 +11,8 @@ fun foo() {
|
||||
---------------------
|
||||
l0:
|
||||
<START>
|
||||
r(new Array<Int>)
|
||||
r(Array)
|
||||
r(Array<Int>)
|
||||
w(a)
|
||||
r(3)
|
||||
r(4)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun foo() {
|
||||
val a = new Array<Int>
|
||||
val a = Array<Int>
|
||||
3
|
||||
a[10] = 4
|
||||
2
|
||||
|
||||
@@ -9,7 +9,7 @@ fun assignments() : Unit {
|
||||
val y = true && false
|
||||
val z = false && true
|
||||
|
||||
val t = new Test();
|
||||
val t = Test();
|
||||
t.x = 1
|
||||
}
|
||||
---------------------
|
||||
@@ -43,7 +43,8 @@ l4:
|
||||
l5:
|
||||
r(false && true)
|
||||
w(z)
|
||||
r(new Test())
|
||||
r(Test)
|
||||
r(Test())
|
||||
w(t)
|
||||
r(1)
|
||||
r(t)
|
||||
|
||||
@@ -12,6 +12,6 @@ fun assignments() : Unit {
|
||||
val y = true && false
|
||||
val z = false && true
|
||||
|
||||
val t = new Test();
|
||||
val t = Test();
|
||||
t.x = 1
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
== fail ==
|
||||
fun fail() : Nothing {
|
||||
throw new java.lang.RuntimeException()
|
||||
throw java.lang.RuntimeException()
|
||||
}
|
||||
---------------------
|
||||
l0:
|
||||
<START>
|
||||
r(new java.lang.RuntimeException())
|
||||
r(java)
|
||||
r(lang)
|
||||
r(java.lang)
|
||||
r(RuntimeException)
|
||||
r(RuntimeException())
|
||||
r(java.lang.RuntimeException())
|
||||
jmp(error)
|
||||
l1:
|
||||
<END>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fun fail() : Nothing {
|
||||
throw new java.lang.RuntimeException()
|
||||
throw java.lang.RuntimeException()
|
||||
}
|
||||
@@ -21,9 +21,9 @@ fun f(): Unit {
|
||||
x == 1
|
||||
x != 1
|
||||
|
||||
<error>new A() == 1</error>
|
||||
new B() <error>==</error> 1
|
||||
new C() <error>==</error> 1
|
||||
<error>A() == 1</error>
|
||||
B() <error>==</error> 1
|
||||
C() <error>==</error> 1
|
||||
|
||||
<error>x === "1"</error>
|
||||
<error>x !== "1"</error>
|
||||
|
||||
@@ -4,14 +4,14 @@ namespace boundsWithSubstitutors {
|
||||
|
||||
class C : A<C>
|
||||
|
||||
val a = new B<C>()
|
||||
val a1 = new B<<error>Int</error>>()
|
||||
val a = B<C>()
|
||||
val a1 = B<<error>Int</error>>()
|
||||
|
||||
class X<A, B : A>()
|
||||
|
||||
val b = new X<Any, X<A<C>, C>>
|
||||
val b0 = new X<Any, <error>Any?</error>>
|
||||
val b1 = new X<Any, X<A<C>, <error>String</error>>>
|
||||
val b = X<Any, X<A<C>, C>>
|
||||
val b0 = X<Any, <error>Any?</error>>
|
||||
val b1 = X<Any, X<A<C>, <error>String</error>>>
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace boundsWithSubstitutors {
|
||||
open class B<T : A>()
|
||||
|
||||
class C<T : B<<error>Int</error>>, X : {(B<<error>Char</error>>) : (B<<error>Any</error>>, B<A>)}>() : B<<error>Any</error>>() { // 2 errors
|
||||
val a = new B<<error>Char</error>>() // error
|
||||
val a = B<<error>Char</error>>() // error
|
||||
|
||||
val x : {(B<<error>Char</error>>) : B<<error>Any</error>>}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace null_safety {
|
||||
command.equals1(null)
|
||||
command<warning>?.</warning>equals1(null)
|
||||
|
||||
val c = new Command()
|
||||
val c = Command()
|
||||
c<warning>?.</warning>equals(null)
|
||||
|
||||
if (command == null) 1
|
||||
|
||||
@@ -66,16 +66,16 @@ class Range1() {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
for (i in <error>new NotRange1()</error>);
|
||||
for (i in <error>new NotRange2()</error>);
|
||||
for (i in <error>new NotRange3()</error>);
|
||||
for (i in <error>new NotRange4()</error>);
|
||||
for (i in <error>new NotRange5()</error>);
|
||||
for (i in <error>new NotRange6()</error>);
|
||||
for (i in <error>new NotRange7()</error>);
|
||||
for (i in new Range0());
|
||||
for (i in new Range1());
|
||||
for (i in <error>NotRange1()</error>);
|
||||
for (i in <error>NotRange2()</error>);
|
||||
for (i in <error>NotRange3()</error>);
|
||||
for (i in <error>NotRange4()</error>);
|
||||
for (i in <error>NotRange5()</error>);
|
||||
for (i in <error>NotRange6()</error>);
|
||||
for (i in <error>NotRange7()</error>);
|
||||
for (i in Range0());
|
||||
for (i in Range1());
|
||||
|
||||
for (i in (new ArrayList<Int>() : List<Int>));
|
||||
for (i in (ArrayList<Int>() : List<Int>));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ class IncDec() {
|
||||
}
|
||||
|
||||
fun testIncDec() {
|
||||
var x = new IncDec()
|
||||
var x = IncDec()
|
||||
x++
|
||||
++x
|
||||
x--
|
||||
@@ -21,7 +21,7 @@ class WrongIncDec() {
|
||||
}
|
||||
|
||||
fun testWrongIncDec() {
|
||||
var x = new WrongIncDec()
|
||||
var x = WrongIncDec()
|
||||
x<error>++</error>
|
||||
<error>++</error>x
|
||||
x<error>--</error>
|
||||
@@ -34,7 +34,7 @@ class UnitIncDec() {
|
||||
}
|
||||
|
||||
fun testUnitIncDec() {
|
||||
var x = new UnitIncDec()
|
||||
var x = UnitIncDec()
|
||||
x++
|
||||
++x
|
||||
x--
|
||||
|
||||
@@ -32,9 +32,9 @@ class Test1<T : A>
|
||||
}
|
||||
|
||||
fun test() {
|
||||
new Test1<<error>B</error>>()
|
||||
new Test1<<error>A</error>>()
|
||||
new Test1<C>()
|
||||
Test1<<error>B</error>>()
|
||||
Test1<<error>A</error>>()
|
||||
Test1<C>()
|
||||
}
|
||||
|
||||
class Foo() {}
|
||||
@@ -60,9 +60,9 @@ fun <T : A>
|
||||
t.bar()
|
||||
}
|
||||
|
||||
val test1 = test2<<error>A</error>>(new A())
|
||||
val test2 = test2<<error>B</error>>(new B())
|
||||
val test3 = test2<C>(new C())
|
||||
val test1 = test2<<error>A</error>>(A())
|
||||
val test2 = test2<<error>B</error>>(B())
|
||||
val test3 = test2<C>(C())
|
||||
|
||||
class Test<<error>T</error>>
|
||||
where
|
||||
|
||||
@@ -5,7 +5,7 @@ import <error>utils</error>.*
|
||||
import java.io.PrintStream
|
||||
import java.lang.Comparable as Com
|
||||
|
||||
val l : List<in Int> = new ArrayList<Int>()
|
||||
val l : List<in Int> = ArrayList<Int>()
|
||||
|
||||
fun test(l : java.util.List<Int>) {
|
||||
val x : java.<error>List</error>
|
||||
@@ -24,7 +24,7 @@ fun test(l : java.util.List<Int>) {
|
||||
Collections.singleton<Int>(1) : Set<Int>?
|
||||
Collections.singleton<Int><error>(1.0)</error>
|
||||
|
||||
<error>new List<Int></error>
|
||||
<error>List</error><Int>
|
||||
|
||||
|
||||
val o = "sdf" <warning>as</warning> Object
|
||||
@@ -36,14 +36,14 @@ fun test(l : java.util.List<Int>) {
|
||||
System.out?.println(e.getMessage())
|
||||
}
|
||||
|
||||
new PrintStream("sdf")
|
||||
PrintStream("sdf")
|
||||
|
||||
val c : Com<Int>? = null
|
||||
|
||||
c : java.lang.Comparable<Int>?
|
||||
|
||||
// Collections.sort<Integer>(new ArrayList<Integer>())
|
||||
new xxx.<error>Class</error>()
|
||||
// Collections.sort<Integer>(ArrayList<Integer>())
|
||||
xxx.Class<error>()</error>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ fun foo(a : Nothing) : Unit {
|
||||
}
|
||||
|
||||
fun fail() : Nothing {
|
||||
throw new java.lang.RuntimeException()
|
||||
throw java.lang.RuntimeException()
|
||||
}
|
||||
|
||||
fun nullIsNotNothing() : Unit {
|
||||
|
||||
@@ -10,15 +10,15 @@ fun takeFirst(expr: StringBuilder): Char {
|
||||
}
|
||||
|
||||
fun evaluateArg(expr: AbstractStringBuilder, numbers: ArrayList<Int>): Int {
|
||||
if (expr.length() == 0) throw new Exception("Syntax error: Character expected");
|
||||
if (expr.length() == 0) throw Exception("Syntax error: Character expected");
|
||||
val c = takeFirst<error>(expr)</error>
|
||||
if (c <error>>=</error> '0' && c <error><=</error> '9') {
|
||||
val n = c - '0'
|
||||
if (!numbers.contains(n)) throw new Exception("You used incorrect number: " + n)
|
||||
if (!numbers.contains(n)) throw Exception("You used incorrect number: " + n)
|
||||
numbers.remove(n)
|
||||
return n
|
||||
}
|
||||
throw new Exception("Syntax error: Unrecognized character " + c)
|
||||
throw Exception("Syntax error: Unrecognized character " + c)
|
||||
}
|
||||
|
||||
fun evaluateAdd(expr: StringBuilder, numbers: ArrayList<Int>): Int {
|
||||
@@ -40,9 +40,9 @@ fun evaluate(expr: StringBuilder, numbers: ArrayList<Int>): Int {
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.out?.println("24 game")
|
||||
val numbers = new ArrayList<Int>(4)
|
||||
val rnd = new Random();
|
||||
val prompt = new StringBuilder()
|
||||
val numbers = ArrayList<Int>(4)
|
||||
val rnd = Random();
|
||||
val prompt = StringBuilder()
|
||||
for(val i in 0..3) {
|
||||
val n = rnd.nextInt(9) + 1
|
||||
numbers.add(n)
|
||||
@@ -51,8 +51,8 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
System.out?.println("Your numbers: " + prompt)
|
||||
System.out?.println("Enter your expression:")
|
||||
val reader = new BufferedReader(new InputStreamReader(System.`in`))
|
||||
val expr = new StringBuilder(reader.readLine())
|
||||
val reader = BufferedReader(InputStreamReader(System.`in`))
|
||||
val expr = StringBuilder(reader.readLine())
|
||||
try {
|
||||
val result = evaluate(expr, numbers)
|
||||
if (result != 24)
|
||||
|
||||
@@ -6,7 +6,7 @@ class Item(val room: Object) {
|
||||
val name : String
|
||||
}
|
||||
|
||||
val items: ArrayList<Item> = new ArrayList<Item>
|
||||
val items: ArrayList<Item> = ArrayList<Item>
|
||||
|
||||
fun test(room : Object) {
|
||||
for(val item: Item in items) {
|
||||
|
||||
@@ -11,7 +11,7 @@ fun vl(l : Left) : Int = l.v
|
||||
fun vr(r : Right) : Int = r.v
|
||||
|
||||
fun box() : String {
|
||||
val d = new D()
|
||||
val d = D()
|
||||
d.v = 42
|
||||
|
||||
if (d.v != 42) return "Fail #1"
|
||||
|
||||
@@ -10,8 +10,8 @@ class Derived2() : Abstract, Base() {}
|
||||
fun test(s : Base) : Boolean = s.n(238) == 239
|
||||
|
||||
fun box() : String {
|
||||
if (!test(new Base())) return "Fail #1"
|
||||
if (!test(new Derived1())) return "Fail #2"
|
||||
if (!test(new Derived2())) return "Fail #3"
|
||||
if (!test(Base())) return "Fail #1"
|
||||
if (!test(Derived1())) return "Fail #2"
|
||||
if (!test(Derived2())) return "Fail #3"
|
||||
return "OK"
|
||||
}
|
||||
@@ -11,22 +11,22 @@ class P3(x : Int, yy : Y) : X(x), Y by yy, Abstract {}
|
||||
class P4(x : Int, yy : Y) : Y by yy, Abstract, X(x) {}
|
||||
|
||||
fun box() : String {
|
||||
if (new X(239).x != 239) return "FAIL #1"
|
||||
if (new Y(239).y != 239) return "FAIL #2"
|
||||
if (X(239).x != 239) return "FAIL #1"
|
||||
if (Y(239).y != 239) return "FAIL #2"
|
||||
|
||||
val p = new Point(240, -1)
|
||||
val p = Point(240, -1)
|
||||
if (p.x + p.y != 239) return "FAIL #3"
|
||||
|
||||
val y = new Y(-1)
|
||||
val p1 = new P1(240, y)
|
||||
val y = Y(-1)
|
||||
val p1 = P1(240, y)
|
||||
if (p1.x + p1.y != 239) return "FAIL #4"
|
||||
val p2 = new P2(240, y)
|
||||
val p2 = P2(240, y)
|
||||
if (p2.x + p2.y != 239) return "FAIL #5"
|
||||
|
||||
val p3 = new P3(240, y)
|
||||
val p3 = P3(240, y)
|
||||
if (p3.x + p3.y != 239) return "FAIL #6"
|
||||
|
||||
val p4 = new P4(240, y)
|
||||
val p4 = P4(240, y)
|
||||
if (p4.x + p4.y != 239) return "FAIL #7"
|
||||
|
||||
"OK"
|
||||
|
||||
@@ -5,10 +5,10 @@ class Outer() {
|
||||
class InnerDerived(): InnerBase() {
|
||||
}
|
||||
|
||||
public val foo: InnerBase? = new InnerDerived()
|
||||
public val foo: InnerBase? = InnerDerived()
|
||||
}
|
||||
|
||||
fun box() {
|
||||
val o = new Outer()
|
||||
val o = Outer()
|
||||
return if (o.foo === null) "fail" else "OK"
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ class Bar(): Foo {
|
||||
}
|
||||
|
||||
fun box() {
|
||||
val bar = new Bar()
|
||||
val bar = Bar()
|
||||
val f = bar.test()
|
||||
return if (f == "xyzzy") "OK" else "fail"
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ class C() {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val c = new C()
|
||||
val c = C()
|
||||
if (c.f != 610) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import java.util.*
|
||||
import java.io.*
|
||||
|
||||
class World() {
|
||||
public val items: ArrayList<Item> = new ArrayList<Item>
|
||||
public val items: ArrayList<Item> = ArrayList<Item>
|
||||
|
||||
class Item() {
|
||||
{
|
||||
@@ -10,11 +10,11 @@ class World() {
|
||||
}
|
||||
}
|
||||
|
||||
val foo = new Item()
|
||||
val foo = Item()
|
||||
}
|
||||
|
||||
fun box() {
|
||||
val w = new World()
|
||||
val w = World()
|
||||
if (w.items.size() != 1) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@ class Outer(val foo: StringBuilder) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
return new Inner()
|
||||
return Inner()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val sb = new StringBuilder("xyzzy")
|
||||
val o = new Outer(sb)
|
||||
val sb = StringBuilder("xyzzy")
|
||||
val o = Outer(sb)
|
||||
val i = o.test()
|
||||
val l = i.len()
|
||||
return if (l != 5) "fail" else "OK"
|
||||
|
||||
@@ -3,6 +3,6 @@ class SimpleClass() {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val c = new SimpleClass()
|
||||
val c = SimpleClass()
|
||||
return c.foo()
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ class Outer() {
|
||||
val outer: Outer get() = this@Outer
|
||||
}
|
||||
|
||||
public val x = new Inner()
|
||||
public val x = Inner()
|
||||
}
|
||||
|
||||
fun box() {
|
||||
val o = new Outer()
|
||||
val o = Outer()
|
||||
return if (o === o.x.outer) "OK" else "fail"
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ fun code(s : Base) : Int {
|
||||
fun test(s : Base) : Boolean = code(s) == 0
|
||||
|
||||
fun box() : String {
|
||||
if (!test(new Base())) return "Fail #1"
|
||||
if (!test(new Derived1())) return "Fail #2"
|
||||
if (!test(new Derived2())) return "Fail #3"
|
||||
if (!test(Base())) return "Fail #1"
|
||||
if (!test(Derived1())) return "Fail #2"
|
||||
if (!test(Derived2())) return "Fail #3"
|
||||
return "OK"
|
||||
}
|
||||
@@ -7,10 +7,10 @@ class Outer() {
|
||||
class InnerDerived(): InnerBase(s) {
|
||||
}
|
||||
|
||||
public val x = new InnerDerived()
|
||||
public val x = InnerDerived()
|
||||
}
|
||||
|
||||
fun box() {
|
||||
val o = new Outer()
|
||||
val o = Outer()
|
||||
return if (o.x.name != "xyzzy") "fail" else "OK"
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ class D() : Left(), Right() {
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
val r : Right = new Right()
|
||||
val d : D = new D()
|
||||
val r : Right = Right()
|
||||
val d : D = D()
|
||||
|
||||
if (r.f() != 42) return "Fail #1"
|
||||
if (d.f() != 239) return "Fail #2"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java.util.*
|
||||
|
||||
fun concat(l: List<String>): String? {
|
||||
val sb = new StringBuilder()
|
||||
val sb = StringBuilder()
|
||||
for(s in l) {
|
||||
sb.append(s)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun concat(l: Array<String>): String? {
|
||||
val sb = new StringBuilder()
|
||||
val sb = StringBuilder()
|
||||
for(s in l) {
|
||||
sb.append(s)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fun StringBuilder.first() = this.charAt(0)
|
||||
|
||||
fun foo() = new StringBuilder("foo").first()
|
||||
fun foo() = StringBuilder("foo").first()
|
||||
|
||||
@@ -8,7 +8,7 @@ fun StringBuilder.takeFirst(): Char {
|
||||
fun foo(expr: StringBuilder): Int {
|
||||
val c = expr.takeFirst()
|
||||
when(c) {
|
||||
'\0' => throw new Exception("zero")
|
||||
else => throw new Exception("nonzero" + c)
|
||||
'\0' => throw Exception("zero")
|
||||
else => throw Exception("nonzero" + c)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun f() {
|
||||
val x = new StringBuilder();
|
||||
val x = StringBuilder();
|
||||
g(x);
|
||||
return x.toString();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@ class SimpleClass {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val c = new SimpleClass()
|
||||
val c = SimpleClass()
|
||||
return c.foo()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import java.io.*
|
||||
fun main(args: Array<String>) {
|
||||
val reader = new BufferedReader(new InputStreamReader(System.`in`))
|
||||
val reader = BufferedReader(InputStreamReader(System.`in`))
|
||||
while(true) {
|
||||
val cmd = reader.readLine() as String
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ class Wrapper<T>() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val wrapper = new Wrapper<Int>()
|
||||
return wrapper.castToSelf(new Wrapper<String>())
|
||||
val wrapper = Wrapper<Int>()
|
||||
return wrapper.castToSelf(Wrapper<String>())
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Point() {
|
||||
}
|
||||
|
||||
fun foo() = new Point()
|
||||
fun foo() = Point()
|
||||
|
||||
@@ -3,6 +3,6 @@ class Wrapper<T>() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val wrapper = new Wrapper<Int>()
|
||||
return wrapper.isSameWrapper(new Wrapper<String>())
|
||||
val wrapper = Wrapper<Int>()
|
||||
return wrapper.isSameWrapper(Wrapper<String>())
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ class Wrapper<T>() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val wrapper = new Wrapper<Int>()
|
||||
val wrapper = Wrapper<Int>()
|
||||
return wrapper is Wrapper<String>
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ class Point() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val p = new Point();
|
||||
val p = Point();
|
||||
return typeof(p);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
fun a(
|
||||
a : foo = throw new Foo(),
|
||||
a : foo = throw Foo(),
|
||||
a : foo = return 10,
|
||||
a : foo = break,
|
||||
a : foo = break @la,
|
||||
|
||||
@@ -22,13 +22,9 @@ JetFile: ControlStructures.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
val z = System.out
|
||||
|
||||
fun foo() { throw new Exception(); }
|
||||
fun foo() { throw Exception(); }
|
||||
|
||||
@@ -30,13 +30,9 @@ JetFile: ModifierAsSelector.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Exception')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Exception')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -5,7 +5,7 @@ class X
|
||||
namespace foo.bar {
|
||||
fun foo() {
|
||||
namespace.foo.bar.X
|
||||
new namespace.foo.bar.X()
|
||||
namespace.foo.bar.X()
|
||||
when (e) {
|
||||
is namespace.foo.bar.X @ (x) => {}
|
||||
}
|
||||
|
||||
@@ -52,26 +52,24 @@ JetFile: RootNamespace.jet
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('X')
|
||||
PsiWhiteSpace('\n ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(namespace)('namespace')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
ROOT_NAMESPACE
|
||||
PsiElement(namespace)('namespace')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('X')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('X')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
|
||||
@@ -19,12 +19,12 @@ fun a(
|
||||
a : foo = (10),
|
||||
a : foo = (10, "A", 0xf),
|
||||
a : foo = typeof(10),
|
||||
a : foo = new Foo(bar),
|
||||
a : foo = new Foo<A>(bar),
|
||||
a : foo = new Foo(),
|
||||
a : foo = new Foo<bar>(),
|
||||
a : foo = Foo(bar),
|
||||
a : foo = Foo<A>(bar),
|
||||
a : foo = Foo(),
|
||||
a : foo = Foo<bar>(),
|
||||
a : foo = object : Foo{},
|
||||
a : foo = throw new Foo(),
|
||||
a : foo = throw Foo(),
|
||||
a : foo = return 10,
|
||||
a : foo = break,
|
||||
a : foo = break @la,
|
||||
|
||||
@@ -366,13 +366,9 @@ JetFile: SimpleExpressions.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -393,21 +389,17 @@ JetFile: SimpleExpressions.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -428,13 +420,9 @@ JetFile: SimpleExpressions.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -452,21 +440,17 @@ JetFile: SimpleExpressions.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -516,13 +500,9 @@ JetFile: SimpleExpressions.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Foo<T : List<This>>(a : This, b : bar<This>) : List<This> by foo as List<This> {
|
||||
fun foo(a : This) : This {
|
||||
val a : This = new Foo<This>();
|
||||
val a : This = Foo<This>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,20 +131,16 @@ JetFile: ThisType.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
SELF_TYPE
|
||||
PsiElement(This)('This')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
SELF_TYPE
|
||||
PsiElement(This)('This')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -17,7 +17,7 @@ enum class GodMessages {
|
||||
|
||||
// Type of this variable is GOD_AnonymousClass
|
||||
val GOD = object {
|
||||
fun sendMessage(message : GodMEssage) = throw new RuntimeException(message.name)
|
||||
fun sendMessage(message : GodMEssage) = throw RuntimeException(message.name)
|
||||
};
|
||||
|
||||
}
|
||||
@@ -186,13 +186,9 @@ JetFile: AnonymousObjects.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('RuntimeException')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('RuntimeException')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
|
||||
@@ -5,7 +5,7 @@ val foo = object : AntBuilder() {
|
||||
}
|
||||
|
||||
[lazy] val gant = library {
|
||||
new File("$gantHome/lib").files.each {
|
||||
File("$gantHome/lib").files.each {
|
||||
classpath(it)
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class AntBuilder {
|
||||
}
|
||||
|
||||
fun library(initializer : { Library.() : Library}) {
|
||||
val lib = new Library()
|
||||
val lib = Library()
|
||||
lib.initializer()
|
||||
return lib
|
||||
}
|
||||
|
||||
@@ -91,13 +91,9 @@ JetFile: Builder.jet
|
||||
BODY
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('File')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('File')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -401,13 +397,9 @@ JetFile: Builder.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Library')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Library')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -4,28 +4,28 @@ class Edge<V, E>(val from : V, val data : E, val to : V)
|
||||
|
||||
class Graph<V, E> {
|
||||
|
||||
private val mutableEdges = new ArrayList<Edge<V, E>>() // type is ArrayList, but I want IMutableList
|
||||
private val mutableEdges = ArrayList<Edge<V, E>>() // type is ArrayList, but I want IMutableList
|
||||
/* options:
|
||||
private val edges : IMutableList<Edge<V, E>> = new ArrayList<Edge<V, E>>()
|
||||
private val edges : IMutableList<Edge<V, E>> = new ArrayList() // not an erasure, but a request to infer parameters
|
||||
private val edges : IMutableList<Edge<V, E>> = ArrayList<Edge<V, E>>()
|
||||
private val edges : IMutableList<Edge<V, E>> = ArrayList() // not an erasure, but a request to infer parameters
|
||||
*/
|
||||
|
||||
private val mutableVertices = new HashSet<Vertex<V>>()
|
||||
private val mutableVertices = HashSet<Vertex<V>>()
|
||||
|
||||
val edges : IList<Edge<V, E>> = mutableEdges;
|
||||
val vertices : ISet<Edge<V, E>> = mutableVertices;
|
||||
|
||||
fun addEdge(from : V, data : E, to : V) {
|
||||
mutableEdges.add(new Edge(from, data, to)) // constructor parameters are inferred
|
||||
mutableEdges.add(Edge(from, data, to)) // constructor parameters are inferred
|
||||
}
|
||||
fun addVertex(v : V) {
|
||||
mutableEdges.add(new Edge(from, data, to)) // constructor parameters are inferred
|
||||
mutableEdges.add(Edge(from, data, to)) // constructor parameters are inferred
|
||||
}
|
||||
|
||||
fun neighbours(v : Vertex<V>) = edges.filter{it.from == v}.map{it.to} // type is IIterable<Vertex<V>>
|
||||
|
||||
fun dfs(handler : {(V) : Unit}) {
|
||||
val visited = new HashSet<Vertex<V>>()
|
||||
val visited = HashSet<Vertex<V>>()
|
||||
vertices.foreach{dfs(it, visited, handler)}
|
||||
|
||||
fun dfs(current : Vertex<V>, visited : ISet<Vertex<V>>, handler : {(V) : Unit}) {
|
||||
|
||||
@@ -105,43 +105,39 @@ JetFile: Graph.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ArrayList')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Edge')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('V')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('E')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ArrayList')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Edge')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('V')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('E')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiComment(EOL_COMMENT)('// type is ArrayList, but I want IMutableList')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiComment(BLOCK_COMMENT)('/* options:\n private val edges : IMutableList<Edge<V, E>> = new ArrayList<Edge<V, E>>()\n private val edges : IMutableList<Edge<V, E>> = new ArrayList() // not an erasure, but a request to infer parameters\n*/')
|
||||
PsiComment(BLOCK_COMMENT)('/* options:\n private val edges : IMutableList<Edge<V, E>> = ArrayList<Edge<V, E>>()\n private val edges : IMutableList<Edge<V, E>> = ArrayList() // not an erasure, but a request to infer parameters\n*/')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
@@ -153,29 +149,25 @@ JetFile: Graph.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('HashSet')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Vertex')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('V')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('HashSet')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Vertex')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('V')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -314,13 +306,9 @@ JetFile: Graph.jet
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Edge')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Edge')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -373,13 +361,9 @@ JetFile: Graph.jet
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Edge')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Edge')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -513,29 +497,25 @@ JetFile: Graph.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('HashSet')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Vertex')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('V')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('HashSet')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Vertex')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('V')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -5,7 +5,7 @@ class Queue<T> : IPushPop<T> {
|
||||
private var tail : Item<T> = null
|
||||
|
||||
override fun push(item : T) {
|
||||
val i = new Item(item)
|
||||
val i = Item(item)
|
||||
if (tail == null) {
|
||||
head = i
|
||||
tail = head
|
||||
@@ -17,7 +17,7 @@ class Queue<T> : IPushPop<T> {
|
||||
|
||||
override fun pop() =
|
||||
if (head == null)
|
||||
throw new UnderflowException()
|
||||
throw UnderflowException()
|
||||
else {
|
||||
val result = head.data
|
||||
head = head.next
|
||||
|
||||
@@ -164,13 +164,9 @@ JetFile: Queue.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Item')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Item')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -289,13 +285,9 @@ JetFile: Queue.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('UnderflowException')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('UnderflowException')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Stack<T> : IPushPop<T> {
|
||||
private val data = new ArrayList<T>();
|
||||
private val data = ArrayList<T>();
|
||||
|
||||
override fun push(item : T) {
|
||||
data.add(item) // Problem: I would like to write push(...) = data.add(...), but the types do not match
|
||||
|
||||
@@ -40,21 +40,17 @@ JetFile: Stack.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ArrayList')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ArrayList')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
class Pair(x : Int, y : Int) {
|
||||
class object {
|
||||
fun copy(from : Pair, x : Int = from.x, y : Int = from.y) = new Pair(x, y)
|
||||
fun copy(from : Pair, x : Int = from.x, y : Int = from.y) = Pair(x, y)
|
||||
}
|
||||
}
|
||||
|
||||
// One can say:
|
||||
val p = new Point(1, 2)
|
||||
val p = Point(1, 2)
|
||||
val p1 = Point.Copy(p, x = 2)
|
||||
val p2 = Point.Copy(p1, y = -1)
|
||||
val p3 = Point.Copy(p)
|
||||
|
||||
@@ -101,13 +101,9 @@ JetFile: UpdateOperation.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Pair')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Pair')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -133,13 +129,9 @@ JetFile: UpdateOperation.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Point')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Point')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
|
||||
@@ -11,13 +11,13 @@ class ArrayList<T> : IMutableList<T> {
|
||||
|
||||
private fun checkVersion() {
|
||||
if (version != myVersion)
|
||||
throw new ConcurrentModificationException()
|
||||
throw ConcurrentModificationException()
|
||||
}
|
||||
|
||||
override fun next() {
|
||||
checkVersion()
|
||||
if (hasNext)
|
||||
throw new NoMoreElementsException()
|
||||
throw NoMoreElementsException()
|
||||
data[index++]
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class ArrayList<T> : IMutableList<T> {
|
||||
|
||||
private fun checkIndex(index : Int) {
|
||||
if (index > used)
|
||||
throw new IndexOutOfBoundsException(index)
|
||||
throw IndexOutOfBoundsException(index)
|
||||
}
|
||||
|
||||
override val isEmpty
|
||||
|
||||
@@ -220,13 +220,9 @@ JetFile: ArrayList.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ConcurrentModificationException')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ConcurrentModificationException')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -267,13 +263,9 @@ JetFile: ArrayList.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('NoMoreElementsException')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('NoMoreElementsException')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -475,13 +467,9 @@ JetFile: ArrayList.jet
|
||||
THROW
|
||||
PsiElement(throw)('throw')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('IndexOutOfBoundsException')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('IndexOutOfBoundsException')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
|
||||
@@ -19,7 +19,7 @@ virtual class IMap<K, V> {
|
||||
class HashableWrapper wraps (val obj : Any) : IHashable
|
||||
// equals and hashCode implementations are inherited
|
||||
|
||||
[inline] fun Any.hashable() : HashableWrapper = new HashableWrapper(this)
|
||||
[inline] fun Any.hashable() : HashableWrapper = HashableWrapper(this)
|
||||
|
||||
virtual class IHashingStrategy<K> {
|
||||
fun equals(a : K, b : K) : Boolean
|
||||
@@ -50,9 +50,9 @@ class StrategyHashMap<K, V>(hashingStrategy : IHashingStrategy<K>) : IMap<K, V>
|
||||
|
||||
|
||||
// where !(K : IHashable)
|
||||
this() : this(new JavaObjectHashingStrategy<K>()) {}
|
||||
this() : this(JavaObjectHashingStrategy<K>()) {}
|
||||
|
||||
//this() where (K : IHashable) : this(new DefaultHashingStrategy<K>()) {}
|
||||
//this() where (K : IHashable) : this(DefaultHashingStrategy<K>()) {}
|
||||
//...
|
||||
|
||||
}
|
||||
@@ -364,13 +364,9 @@ JetFile: HashMap.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('HashableWrapper')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('HashableWrapper')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -955,21 +951,17 @@ JetFile: HashMap.jet
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
NEW
|
||||
PsiElement(new)('new')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('JavaObjectHashingStrategy')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('K')
|
||||
PsiElement(GT)('>')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('JavaObjectHashingStrategy')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PROJECTION
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('K')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -979,7 +971,7 @@ JetFile: HashMap.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiComment(EOL_COMMENT)('//this() where (K : IHashable) : this(new DefaultHashingStrategy<K>()) {}')
|
||||
PsiComment(EOL_COMMENT)('//this() where (K : IHashable) : this(DefaultHashingStrategy<K>()) {}')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiComment(EOL_COMMENT)('//...')
|
||||
PsiWhiteSpace('\n\n')
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
~foo~fun foo(~foo.a~a : `std::Char`Char) = `foo.a`a`:std::Char`
|
||||
~fooB~fun fooB() = `foo`foo('1')`:std::Char`
|
||||
~foo.1~fun foo() : Int = (1.`std::Int.plus(Int)`plus(1))`:std::Int`
|
||||
~foo1~fun foo1() : `B`B = new `B()`B()`:B`
|
||||
~foo1~fun foo1() : `B`B = `B()`B()`:B`
|
||||
~A.a~val a : `std::Int`Int
|
||||
}
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ namespace Jet86
|
||||
|
||||
val a = `A`A.`A.x`x
|
||||
val c = `B`B.`!null`x
|
||||
val d = new B().`B.x`x
|
||||
val d = B().`B.x`x
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
class C(~x~x : Int, ~y~val y : Int) : Base(`x`x /*parameter*/), Base1 by new Base1(`x`x) {
|
||||
class C(~x~x : Int, ~y~val y : Int) : Base(`x`x /*parameter*/), Base1 by Base1(`x`x) {
|
||||
var z = `x`x // parameter
|
||||
get() = `$x`x // property
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class A(~a~val a : Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
~va~val a = new A()
|
||||
~va~val a = A()
|
||||
`va`a.`$a`a`:std::Int`
|
||||
a.`b`b`:std::Int`
|
||||
a.`f`f()`:std::Int`
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
class In<in T> {
|
||||
class In<in T>() {
|
||||
~In.f:T->Unit~fun f(t : T) : Unit {}
|
||||
~In.f:Int->Int~fun f(t : Int) : Int {}
|
||||
~In.f1~fun f1(t : T) : Unit {}
|
||||
}
|
||||
|
||||
class Out<out T> {
|
||||
class Out<out T>() {
|
||||
~Out.f~fun f() : T {}
|
||||
~Out.f(a)~fun f(a : Int) : Int {a}
|
||||
}
|
||||
|
||||
class Inv<T> {
|
||||
class Inv<T>() {
|
||||
~Inv.f~fun f(t : T) : T {t}
|
||||
~Inv.inf~fun inf(t : T) : Unit {}
|
||||
~Inv.outf~fun outf() : T {}
|
||||
}
|
||||
|
||||
fun testInOut() {
|
||||
new In<String>().`In.f:T->Unit`f("1");
|
||||
In<String>().`In.f:T->Unit`f("1");
|
||||
(return : In<in String>).`In.f:T->Unit`f("1");
|
||||
(return : In<out String>).`!`f("1")
|
||||
(return : In<*>).`!`f("1");
|
||||
|
||||
new In<String>().`In.f:Int->Int`f(1);
|
||||
In<String>().`In.f:Int->Int`f(1);
|
||||
(return : In<in String>).`In.f:Int->Int`f(1);
|
||||
(return : In<out String>).`In.f:Int->Int`f(1)
|
||||
(return : In<out String>).`!`f1(1)
|
||||
(return : In<*>).`In.f:Int->Int`f(1);
|
||||
|
||||
new Out<Int>().`Out.f(a)`f(1)
|
||||
Out<Int>().`Out.f(a)`f(1)
|
||||
(return : Out<out Int>).`Out.f(a)`f(1)
|
||||
(return : Out<in Int>).`Out.f(a)`f(1)
|
||||
(return : Out<*>).`Out.f(a)`f(1)
|
||||
|
||||
new Out<Int>().`Out.f`f()
|
||||
Out<Int>().`Out.f`f()
|
||||
(return : Out<out Int>).`Out.f`f()
|
||||
(return : Out<in Int>).`Out.f`f()
|
||||
(return : Out<*>).`Out.f`f()
|
||||
|
||||
new Inv<Int>().`Inv.f`f(1)
|
||||
Inv<Int>().`Inv.f`f(1)
|
||||
(return : Inv<in Int>).`Inv.f`f(1)
|
||||
(return : Inv<out Int>).`!`f(1)
|
||||
(return : Inv<*>).`!`f(1)
|
||||
|
||||
new Inv<Int>().`Inv.inf`inf(1)
|
||||
Inv<Int>().`Inv.inf`inf(1)
|
||||
(return : Inv<in Int>).`Inv.inf`inf(1)
|
||||
(return : Inv<out Int>).`!`inf(1)
|
||||
(return : Inv<*>).`!`inf(1)
|
||||
|
||||
new Inv<Int>().`Inv.outf`outf()
|
||||
Inv<Int>().`Inv.outf`outf()
|
||||
((return : Inv<in Int>).`Inv.outf`outf())`:std::Any`
|
||||
(return : Inv<out Int>).`Inv.outf`outf()
|
||||
(return : Inv<*>).`Inv.outf`outf()
|
||||
|
||||
new Inv<Int>().`Inv.outf`outf(1)
|
||||
Inv<Int>().`Inv.outf`outf(1)
|
||||
}
|
||||
@@ -23,13 +23,13 @@ fun f_plus(): Int {
|
||||
~t~fun <~t.T~T> t(~t.t~t : `t.T`T) : `t.T`T {
|
||||
`t`t<Int>(1)`:std::Int`
|
||||
`t`t<`t.T`T>(`t.t`t)`:t.T`
|
||||
new `X()`X<`t.T`T>()
|
||||
`X()`X<`t.T`T>()
|
||||
1 `std::Int.plus(Int)`+ 1
|
||||
1 `std::Int.plus(Int)`+= 1
|
||||
new X<String>() `plus`+ "1"
|
||||
new X<String>() `plus`plus "sadfas"
|
||||
new X<String>().`plus`plus("")
|
||||
val x = new X<String>()
|
||||
X<String>() `plus`+ "1"
|
||||
X<String>() `plus`plus "sadfas"
|
||||
X<String>().`plus`plus("")
|
||||
val x = X<String>()
|
||||
x `minus`- ""
|
||||
x `times`* ""
|
||||
x `div`/ ""
|
||||
@@ -61,7 +61,7 @@ fun f_plus(): Int {
|
||||
fun <T> tt(t : T) : T {
|
||||
val x : List<Int> = 0
|
||||
x`java::java.util.List.get()`[1]
|
||||
val foo = new `Bar()`Bar()
|
||||
val foo = `Bar()`Bar()
|
||||
foo`!`[null, 1]
|
||||
foo`get2`[1, 1]
|
||||
foo`get1`[1]
|
||||
@@ -72,7 +72,7 @@ fun <T> tt(t : T) : T {
|
||||
x`!`[null] = null
|
||||
(x`!`[null, 2]) = null
|
||||
(`not`!foo)[1]`:std::Char`
|
||||
val y = new Bar()
|
||||
val y = Bar()
|
||||
y`inc`++
|
||||
`inc`++y
|
||||
`dec`--y
|
||||
@@ -87,13 +87,13 @@ fun <T> tt(t : T) : T {
|
||||
}
|
||||
|
||||
|
||||
class UnitIncDec {
|
||||
class UnitIncDec() {
|
||||
~uinc~fun inc() : Unit
|
||||
~udec~fun dec() : Unit
|
||||
}
|
||||
|
||||
fun testUnitIncDec() {
|
||||
var x = new UnitIncDec()
|
||||
var x = UnitIncDec()
|
||||
x`uinc`++
|
||||
x`udec`--
|
||||
}
|
||||
@@ -8,7 +8,7 @@ fun foo(~a~a : `std::Array`Array<`std::Int`Int>) : `java::java.util.List`List {
|
||||
|
||||
fun foo(o : `java::java.lang.Object`Object, l : `java::java.util`util.`java::java.util.List`List) : `java::java.util.List`List {}
|
||||
|
||||
~A~class A {
|
||||
~A~class A() {
|
||||
fun f(a : `java::java.util`util.`java::java.util.List`List) {}
|
||||
fun f(a : `java::java.util.List`List) {}
|
||||
|
||||
@@ -31,7 +31,7 @@ class B : `java::java.lang.Object`Object {
|
||||
}
|
||||
|
||||
fun barrr() : `std::Int`Int {
|
||||
`foo`foo(new `A`A())
|
||||
`foo`foo(`A`A())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class B : `java::java.lang.Object`Object {
|
||||
}
|
||||
|
||||
fun <T> t(t : T) : T {
|
||||
`c`c(new java.lang.Integer(1))
|
||||
`c`c(java.lang.Integer(1))
|
||||
System.out.`java::java.io.PrintStream.print(Object)`print(t)
|
||||
System.out.`java::java.io.PrintStream.print(char[])`print(null : Array<Char>?)
|
||||
System.out.`java::java.io.PrintStream.print(Object)`print(null : Object?)
|
||||
|
||||
@@ -5,5 +5,5 @@ var xxxx = 1
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
new `SimpleClass`SimpleClass(1).`!`xxxx
|
||||
`SimpleClass`SimpleClass(1).`!`xxxx
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user