Merge pull request #472 from Conaclos/eiffel-example Add Eiffel examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
diff --git a/examples/prism-eiffel.html b/examples/prism-eiffel.html
new file mode 100644
index 0000000..c07021f
--- /dev/null
+++ b/examples/prism-eiffel.html
@@ -0,0 +1,75 @@
+<h1>Eiffel</h1>
+<p>To use this language, use the class "language-eiffel".</p>
+
+<h2>Comments</h2>
+<pre><code>
+-- A comment
+</code></pre>
+
+<h2>Simple string and character</h2>
+<pre><code>
+"A simple string with %"double quotes%""
+'a'
+</code></pre>
+
+<h2>Verbatim-strings</h2>
+<pre><code>
+"[
+ A aligned verbatim string
+]"
+"{
+ A non-aligned verbatim string
+}"
+</code></pre>
+
+<h2>Numbers</h2>
+<pre><code>
+1_000
+1_000.
+1_000.e+1_000
+1_000.1_000e-1_000
+.1
+0b1010_0001
+0xAF_5B
+0c75_22
+</code></pre>
+
+<h2>Full example</h2>
+<pre><code>
+note
+ description: "Represents a person."
+
+class
+ PERSON
+
+create
+ make, make_unknown
+
+feature {NONE} -- Creation
+
+ make (a_name: like name)
+ -- Create a person with `a_name' as `name'.
+ do
+ name := a_name
+ ensure
+ name = a_name
+ end
+
+ make_unknown
+ do ensure
+ name = Void
+ end
+
+feature -- Access
+
+ name: detachable STRING
+ -- Full name or Void if unknown.
+
+end
+</code></pre>
+
+<h2>Known failures</h2>
+<h3>Strings in comments</h3>
+<pre><code>
+-- A "hacked" comment
+</code></pre>