|
@@ -38,7 +38,7 @@
|
|
<div class="container body-container">
|
|
<div class="container body-container">
|
|
<div class="main-content">
|
|
<div class="main-content">
|
|
<div class="row">
|
|
<div class="row">
|
|
-
|
|
|
|
|
|
+
|
|
<!-- BEGIN SIDEBAR -->
|
|
<!-- BEGIN SIDEBAR -->
|
|
<div class="col-sm-3 border-right section-left">
|
|
<div class="col-sm-3 border-right section-left">
|
|
<div saveheight="1" class="sidebar-nav">
|
|
<div saveheight="1" class="sidebar-nav">
|
|
@@ -72,17 +72,17 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- END SIDEBAR -->
|
|
<!-- END SIDEBAR -->
|
|
-
|
|
|
|
|
|
+
|
|
<!-- BEGIN CONTENT -->
|
|
<!-- BEGIN CONTENT -->
|
|
<div class="col-sm-9 border-left section-right">
|
|
<div class="col-sm-9 border-left section-right">
|
|
<h1 class="section-header">Getting started</h1><hr>
|
|
<h1 class="section-header">Getting started</h1><hr>
|
|
|
|
|
|
<!-- Installation -->
|
|
<!-- Installation -->
|
|
<h4 class="section-h4">Install</h4>
|
|
<h4 class="section-h4">Install</h4>
|
|
-
|
|
|
|
|
|
+
|
|
<p class="section-content">
|
|
<p class="section-content">
|
|
- To install Gravity simple execute the commands given below. It should make two executables: the compiler itself
|
|
|
|
- and test runner.
|
|
|
|
|
|
+ To install Gravity, simply execute the commands given below. It should make two executables: the compiler itself
|
|
|
|
+ and test runner.
|
|
<pre><code>
|
|
<pre><code>
|
|
git clone https://github.com/marcobambini/gravity.git
|
|
git clone https://github.com/marcobambini/gravity.git
|
|
cd gravity
|
|
cd gravity
|
|
@@ -91,7 +91,7 @@
|
|
</p>
|
|
</p>
|
|
|
|
|
|
<blockquote>
|
|
<blockquote>
|
|
- <p>If you want to access gravity compiler globally just add it to your <b>PATH</b>!</p>
|
|
|
|
|
|
+ <p>If you want to access the gravity compiler globally just add it to your <b>PATH</b>!</p>
|
|
</blockquote>
|
|
</blockquote>
|
|
|
|
|
|
<blockquote>
|
|
<blockquote>
|
|
@@ -106,26 +106,28 @@
|
|
Just click on your favourite editor and configure it accordingly:
|
|
Just click on your favourite editor and configure it accordingly:
|
|
<ul>
|
|
<ul>
|
|
<li><a href="https://github.com/Dohxis/vscode-gravity">Visual Studio Code</a></li>
|
|
<li><a href="https://github.com/Dohxis/vscode-gravity">Visual Studio Code</a></li>
|
|
|
|
+ <li><a href="https://github.com/Tribex/atom-language-gravity">Atom</a></li>
|
|
|
|
+ <li><a href="https://github.com/hallzy/gravity.vim">vim</a></li>
|
|
</ul>
|
|
</ul>
|
|
</p>
|
|
</p>
|
|
|
|
|
|
<!-- Command line -->
|
|
<!-- Command line -->
|
|
<h4 class="section-h4">Command line</h4>
|
|
<h4 class="section-h4">Command line</h4>
|
|
- <p>To check all possible flags you can run command below:</p>
|
|
|
|
|
|
+ <p>To view all possible flags you can run the command below:</p>
|
|
<pre><code>
|
|
<pre><code>
|
|
./gravity --help
|
|
./gravity --help
|
|
</code></pre>
|
|
</code></pre>
|
|
-
|
|
|
|
|
|
+
|
|
<p>To compile a gravity file to a exec.json executable:</p>
|
|
<p>To compile a gravity file to a exec.json executable:</p>
|
|
<pre><code>
|
|
<pre><code>
|
|
./gravity -c myfile.gravity -o exec.json
|
|
./gravity -c myfile.gravity -o exec.json
|
|
</code></pre>
|
|
</code></pre>
|
|
-
|
|
|
|
|
|
+
|
|
<p>To execute a precompiled json executable file:</p>
|
|
<p>To execute a precompiled json executable file:</p>
|
|
<pre><code>
|
|
<pre><code>
|
|
./gravity -x exec.json
|
|
./gravity -x exec.json
|
|
</code></pre>
|
|
</code></pre>
|
|
-
|
|
|
|
|
|
+
|
|
<p>To directly execute a gravity file (without first serializing it to json):</p>
|
|
<p>To directly execute a gravity file (without first serializing it to json):</p>
|
|
<pre><code>
|
|
<pre><code>
|
|
./gravity myfile.gravity
|
|
./gravity myfile.gravity
|
|
@@ -140,10 +142,10 @@
|
|
<p>You should obtain an output like:
|
|
<p>You should obtain an output like:
|
|
<img src="images/unittest.png" width="666px" height="466px">
|
|
<img src="images/unittest.png" width="666px" height="466px">
|
|
</p>
|
|
</p>
|
|
-
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<!-- END CONTENT -->
|
|
<!-- END CONTENT -->
|
|
-
|
|
|
|
|
|
+
|
|
</div> <!-- /row -->
|
|
</div> <!-- /row -->
|
|
</div> <!-- /main-content -->
|
|
</div> <!-- /main-content -->
|
|
</div> <!-- /container -->
|
|
</div> <!-- /container -->
|
|
@@ -156,14 +158,14 @@
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</footer>
|
|
<!-- END FOOTER -->
|
|
<!-- END FOOTER -->
|
|
-
|
|
|
|
|
|
+
|
|
<!-- Bootstrap JS -->
|
|
<!-- Bootstrap JS -->
|
|
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
|
|
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- Highlights JS -->
|
|
<!-- Highlights JS -->
|
|
<script src="scripts/highlight/highlight.min.js"></script>
|
|
<script src="scripts/highlight/highlight.min.js"></script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
-
|
|
|
|
|
|
+
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|