-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79804b4
commit 06f10c5
Showing
9 changed files
with
1,173 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
86 changes: 86 additions & 0 deletions
86
src/org/rascalmpl/semantics/dynamic/SyntaxRoleModifier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2009-2013 CWI | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* * Jurgen J. Vinju - [email protected] - CWI | ||
* * Mark Hills - [email protected] (CWI) | ||
*******************************************************************************/ | ||
package org.rascalmpl.semantics.dynamic; | ||
|
||
import org.rascalmpl.ast.Name; | ||
import org.rascalmpl.interpreter.IEvaluator; | ||
import org.rascalmpl.interpreter.env.Environment; | ||
import org.rascalmpl.interpreter.result.Result; | ||
import io.usethesource.vallang.IConstructor; | ||
import io.usethesource.vallang.ISourceLocation; | ||
import io.usethesource.vallang.IValue; | ||
import io.usethesource.vallang.type.Type; | ||
|
||
public abstract class SyntaxRoleModifier extends org.rascalmpl.ast.SyntaxRoleModifier { | ||
|
||
static public class Syntax extends org.rascalmpl.ast.SyntaxRoleModifier.Syntax { | ||
public Syntax(ISourceLocation __param1, IConstructor tree, org.rascalmpl.ast.TypeArg __param2) { | ||
super(__param1, tree, __param2); | ||
} | ||
|
||
@Override | ||
public Type typeOf(Environment __eval, IEvaluator<Result<IValue>> eval, boolean instantiateTypeParameters) { | ||
return RTF.modifyToSyntax(getArg().typeOf(__eval, eval, instantiateTypeParameters)); | ||
} | ||
} | ||
|
||
static public class Lexical extends org.rascalmpl.ast.SyntaxRoleModifier.Lexical { | ||
public Lexical(ISourceLocation __param1, IConstructor tree, org.rascalmpl.ast.TypeArg __param2) { | ||
super(__param1, tree, __param2); | ||
} | ||
|
||
@Override | ||
public Type typeOf(Environment __eval, IEvaluator<Result<IValue>> eval, boolean instantiateTypeParameters) { | ||
return RTF.modifyToLexical(getArg().typeOf(__eval, eval, instantiateTypeParameters)); | ||
} | ||
} | ||
|
||
static public class Layout extends org.rascalmpl.ast.SyntaxRoleModifier.Layout { | ||
public Layout(ISourceLocation __param1, IConstructor tree, org.rascalmpl.ast.TypeArg __param2) { | ||
super(__param1, tree, __param2); | ||
} | ||
|
||
@Override | ||
public Type typeOf(Environment __eval, IEvaluator<Result<IValue>> eval, boolean instantiateTypeParameters) { | ||
return RTF.modifyToLayout(getArg().typeOf(__eval, eval, instantiateTypeParameters)); | ||
} | ||
} | ||
|
||
static public class Keyword extends org.rascalmpl.ast.SyntaxRoleModifier.Keyword { | ||
public Keyword(ISourceLocation __param1, IConstructor tree, org.rascalmpl.ast.TypeArg __param2) { | ||
super(__param1, tree, __param2); | ||
} | ||
|
||
@Override | ||
public Type typeOf(Environment __eval, IEvaluator<Result<IValue>> eval, boolean instantiateTypeParameters) { | ||
return RTF.modifyToKeyword(getArg().typeOf(__eval, eval, instantiateTypeParameters)); | ||
} | ||
} | ||
|
||
static public class Data extends org.rascalmpl.ast.SyntaxRoleModifier.Data { | ||
public Data(ISourceLocation __param1, IConstructor tree, org.rascalmpl.ast.TypeArg __param2) { | ||
super(__param1, tree, __param2); | ||
} | ||
|
||
@Override | ||
public Type typeOf(Environment __eval, IEvaluator<Result<IValue>> eval, boolean instantiateTypeParameters) { | ||
return RTF.modifyToData(getArg().typeOf(__eval, eval, instantiateTypeParameters)); | ||
} | ||
} | ||
|
||
|
||
|
||
public SyntaxRoleModifier(ISourceLocation __param1, IConstructor tree) { | ||
super(__param1, tree); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.