literals.expect.txt 2.2 KB

1234567891011121314151617181920212223242526272829
  1. <span class="hljs-keyword">let</span> i = <span class="hljs-number">14</span>
  2. <span class="hljs-keyword">let</span> i = -<span class="hljs-number">14</span>
  3. <span class="hljs-keyword">let</span> i = <span class="hljs-number">1_000</span>
  4. <span class="hljs-keyword">let</span> i = <span class="hljs-number">0b100</span>
  5. <span class="hljs-keyword">let</span> i = <span class="hljs-number">0x1FF</span>
  6. <span class="hljs-keyword">let</span> i = <span class="hljs-number">0o777</span>
  7. <span class="hljs-keyword">let</span> i64 = <span class="hljs-number">128L</span>
  8. <span class="hljs-keyword">let</span> i64 = <span class="hljs-number">0b10L</span>
  9. <span class="hljs-keyword">let</span> i32 = <span class="hljs-number">32l</span>
  10. <span class="hljs-keyword">let</span> i32 = <span class="hljs-number">0x12l</span>
  11. <span class="hljs-keyword">let</span> nat = <span class="hljs-number">10n</span>
  12. <span class="hljs-keyword">let</span> nat = <span class="hljs-number">0o644n</span>
  13. <span class="hljs-keyword">let</span> f = <span class="hljs-number">5.</span>
  14. <span class="hljs-keyword">let</span> f = <span class="hljs-number">5.1</span>
  15. <span class="hljs-keyword">let</span> f = <span class="hljs-number">1e+1</span>
  16. <span class="hljs-keyword">let</span> f = <span class="hljs-number">1e1</span>
  17. <span class="hljs-keyword">let</span> f = <span class="hljs-number">1e-1</span>
  18. <span class="hljs-keyword">let</span> f = <span class="hljs-number">1_024e12</span>
  19. <span class="hljs-keyword">let</span> f = <span class="hljs-number">1L</span>
  20. <span class="hljs-keyword">let</span> b = <span class="hljs-literal">true</span> || <span class="hljs-literal">false</span>
  21. <span class="hljs-keyword">let</span> l = <span class="hljs-literal">[]</span>
  22. <span class="hljs-keyword">let</span> a = <span class="hljs-literal">[||]</span>
  23. <span class="hljs-keyword">let</span> <span class="hljs-literal">()</span> = ignore (b)
  24. <span class="hljs-keyword">let</span> c = <span class="hljs-string">'a'</span>
  25. <span class="hljs-keyword">let</span> c = <span class="hljs-string">'\xFF'</span>
  26. <span class="hljs-keyword">let</span> c = <span class="hljs-string">'\128'</span>
  27. <span class="hljs-keyword">let</span> c = <span class="hljs-string">'\n'</span>