-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements PsiFunctionCallParams in ReasonML
- Loading branch information
Showing
9 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
src/main/java/com/reason/lang/core/psi/PsiFunctionCallParams.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,21 @@ | ||
package com.reason.lang.core.psi; | ||
|
||
import com.intellij.extapi.psi.ASTWrapperPsiElement; | ||
import com.intellij.lang.ASTNode; | ||
|
||
public class PsiFunctionCallParams extends ASTWrapperPsiElement { | ||
|
||
public PsiFunctionCallParams(ASTNode node) { | ||
super(node); | ||
} | ||
|
||
@Override | ||
public boolean canNavigate() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "function call params"; | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.reason.lang.ocaml; | ||
|
||
import com.reason.lang.BaseParsingTestCase; | ||
import com.reason.lang.reason.RmlParserDefinition; | ||
|
||
public class FunctionCallTest extends BaseParsingTestCase { | ||
public FunctionCallTest() { | ||
super("", "re", new RmlParserDefinition()); | ||
} | ||
|
||
public void testCall() { | ||
//PsiLet e = first(letExpressions(parseCode("let t = string_of_int 1"))); | ||
// | ||
//assertNotNull(first(PsiTreeUtil.findChildrenOfType(e, PsiFunctionCallParams.class))); | ||
} | ||
|
||
} |
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,19 @@ | ||
package com.reason.lang.reason; | ||
|
||
import com.intellij.psi.util.PsiTreeUtil; | ||
import com.reason.lang.BaseParsingTestCase; | ||
import com.reason.lang.core.psi.PsiFunctionCallParams; | ||
import com.reason.lang.core.psi.PsiLet; | ||
|
||
public class FunctionCallTest extends BaseParsingTestCase { | ||
public FunctionCallTest() { | ||
super("", "re", new RmlParserDefinition()); | ||
} | ||
|
||
public void testCall() { | ||
PsiLet e = first(letExpressions(parseCode("let t = string_of_int(1);"))); | ||
|
||
assertNotNull(first(PsiTreeUtil.findChildrenOfType(e, PsiFunctionCallParams.class))); | ||
} | ||
|
||
} |