From b8837f1e9c23ebc74ab77a485aca35570ed4cf72 Mon Sep 17 00:00:00 2001
From: Tomas Stupka <tomas.stupka@oracle.com>
Date: Wed, 11 Apr 2018 16:22:48 +0200
Subject: [PATCH] add help pages for eval.polyglot, export, import

(cherry picked from commit 3558d2aed4be3367c067e0fad139dbd3d26dd35f)
---
 .../r/nodes/builtin/base/Rd/eval.polyglot.Rd  | 21 ++++++++++++
 .../truffle/r/nodes/builtin/base/Rd/export.Rd | 32 +++++++++++++++++++
 .../truffle/r/nodes/builtin/base/Rd/import.Rd | 26 +++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/eval.polyglot.Rd
 create mode 100644 com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/export.Rd
 create mode 100644 com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/import.Rd

diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/eval.polyglot.Rd b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/eval.polyglot.Rd
new file mode 100644
index 0000000000..4de19f8e55
--- /dev/null
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/eval.polyglot.Rd
@@ -0,0 +1,21 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/fastrInteropt.R
+\name{eval.polyglot}
+\alias{eval.polyglot}
+\title{Evaluates expressions in the language with the given id. Either the source text or path to a text file are accepted.}
+\usage{
+eval.polyglot(languageId, source, path)
+}
+\arguments{
+\item{languageId}{character string. Determines the language in which to evaluate the source.}
+
+\item{source}{character string. The text source which has to be evaluated.}
+
+\item{path}{character string. Path to a source file.}
+}
+\description{
+Evaluates expressions in the language with the given id. Either the source text or path to a text file are accepted.
+}
+\examples{
+eval.polyglot("R", "42")
+}
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/export.Rd b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/export.Rd
new file mode 100644
index 0000000000..594855dffb
--- /dev/null
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/export.Rd
@@ -0,0 +1,32 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/fastrInteropt.R
+\name{export}
+\alias{export}
+\title{Explicitly exports a polyglot symbol. Exporting a symbol with a NULL value will remove the
+symbol from the polyglot object.
+The exported symbol value can either be a polyglot object (e.g. a native
+object from another language) to support interoperability between languages,
+or a R object.}
+\usage{
+export(symbolName, value)
+}
+\arguments{
+\item{symbolName}{character string. The name with which the symbol should be exported into the polyglot
+scope.}
+
+\item{value}{The value to export for}
+}
+\description{
+Explicitly exports a polyglot symbol. Exporting a symbol with a NULL value will remove the
+symbol from the polyglot object.
+The exported symbol value can either be a polyglot object (e.g. a native
+object from another language) to support interoperability between languages,
+or a R object.
+}
+\examples{
+export('foo', 'foo')
+export('foo', new.env())
+}
+\seealso{
+\code{\link{import}}
+}
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/import.Rd b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/import.Rd
new file mode 100644
index 0000000000..5a69aee96e
--- /dev/null
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Rd/import.Rd
@@ -0,0 +1,26 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/fastrInteropt.R
+\name{import}
+\alias{import}
+\title{Explicitly imports a polyglot symbol. Reading a symbol that does not exist will return NULL.
+The returned symbol value can either be a polyglot object (e.g. a native
+object from the other language) to support interoperability between languages, 
+or a value converted into a native R type - e.g. integer, double, logical, character, etc.}
+\usage{
+import(symbolName)
+}
+\arguments{
+\item{symbolName}{character string. The name of the symbol to search for.}
+}
+\description{
+Explicitly imports a polyglot symbol. Reading a symbol that does not exist will return NULL.
+The returned symbol value can either be a polyglot object (e.g. a native
+object from the other language) to support interoperability between languages, 
+or a value converted into a native R type - e.g. integer, double, logical, character, etc.
+}
+\examples{
+import('foo')
+}
+\seealso{
+\code{\link{export}}
+}
-- 
GitLab