Skip to content

Commit

Permalink
adding boilerplate copied and pasted to parsing_kotlin_tree_sitter (s…
Browse files Browse the repository at this point in the history
…emgrep#1978)

Co-authored-by: Colleen Dai <[email protected]>
  • Loading branch information
colleend and Colleen Dai authored Nov 6, 2020
1 parent a707921 commit d900118
Show file tree
Hide file tree
Showing 3 changed files with 1,891 additions and 6 deletions.
7 changes: 7 additions & 0 deletions semgrep-core/parsing/Parse_code.ml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ let just_parse_with_lang lang file =
*)
run file [TreeSitter Parse_csharp_tree_sitter.parse] (fun x -> x)

| Lang.Kotlin ->
(* there is no pfff parser for Kotlin so let's go directly to tree-sitter,
* and there's no ast_kotlin.ml either so we directly generate
* a generic AST (no kotlin_to_generic here)
*)
run file [TreeSitter Parse_kotlin_tree_sitter.parse] (fun x -> x)

(* default to the one in pfff for the other languages *)
| _ ->
run file [Pfff (Parse_generic.parse_with_lang lang)] (fun x -> x)
Expand Down
Loading

0 comments on commit d900118

Please sign in to comment.