index.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `parse` mod in crate `syn`."><meta name="keywords" content="rust, rustlang, rust-lang, parse"><title>syn::parse - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><p class='location'>Module parse</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>syn</a></p><script>window.sidebarCurrent = {name: 'parse', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>syn</a>::<wbr><a class="mod" href=''>parse</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/syn/lib.rs.html#185-211' title='goto source code'>[src]</a></span></h1><div class='docblock'><p>This module contains a set of exported nom parsers which can be used to
  2. parse custom grammars when used alongside the <code>synom</code> crate.</p>
  3. <p>Internally, <code>syn</code> uses a fork of <code>nom</code> called <code>synom</code> which resolves a
  4. persistent pitfall of using <code>nom</code> to parse Rust by eliminating the
  5. <code>IResult::Incomplete</code> variant. The <code>synom</code> crate should be used instead
  6. of <code>nom</code> when working with the parsers in this module.</p>
  7. </div><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
  8. <table>
  9. <tr class=' module-item'>
  10. <td><a class="enum" href="enum.IResult.html"
  11. title='enum syn::parse::IResult'>IResult</a></td>
  12. <td class='docblock-short'>
  13. <p>The result of a parser.</p>
  14. </td>
  15. </tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
  16. <table>
  17. <tr class=' module-item'>
  18. <td><a class="fn" href="fn.boolean.html"
  19. title='fn syn::parse::boolean'>boolean</a></td>
  20. <td class='docblock-short'>
  21. </td>
  22. </tr>
  23. <tr class=' module-item'>
  24. <td><a class="fn" href="fn.byte.html"
  25. title='fn syn::parse::byte'>byte</a></td>
  26. <td class='docblock-short'>
  27. </td>
  28. </tr>
  29. <tr class=' module-item'>
  30. <td><a class="fn" href="fn.byte_string.html"
  31. title='fn syn::parse::byte_string'>byte_string</a></td>
  32. <td class='docblock-short'>
  33. </td>
  34. </tr>
  35. <tr class=' module-item'>
  36. <td><a class="fn" href="fn.character.html"
  37. title='fn syn::parse::character'>character</a></td>
  38. <td class='docblock-short'>
  39. </td>
  40. </tr>
  41. <tr class=' module-item'>
  42. <td><a class="fn" href="fn.float.html"
  43. title='fn syn::parse::float'>float</a></td>
  44. <td class='docblock-short'>
  45. </td>
  46. </tr>
  47. <tr class=' module-item'>
  48. <td><a class="fn" href="fn.ident.html"
  49. title='fn syn::parse::ident'>ident</a></td>
  50. <td class='docblock-short'>
  51. </td>
  52. </tr>
  53. <tr class=' module-item'>
  54. <td><a class="fn" href="fn.int.html"
  55. title='fn syn::parse::int'>int</a></td>
  56. <td class='docblock-short'>
  57. </td>
  58. </tr>
  59. <tr class=' module-item'>
  60. <td><a class="fn" href="fn.lifetime.html"
  61. title='fn syn::parse::lifetime'>lifetime</a></td>
  62. <td class='docblock-short'>
  63. </td>
  64. </tr>
  65. <tr class=' module-item'>
  66. <td><a class="fn" href="fn.lit.html"
  67. title='fn syn::parse::lit'>lit</a></td>
  68. <td class='docblock-short'>
  69. </td>
  70. </tr>
  71. <tr class=' module-item'>
  72. <td><a class="fn" href="fn.path.html"
  73. title='fn syn::parse::path'>path</a></td>
  74. <td class='docblock-short'>
  75. </td>
  76. </tr>
  77. <tr class=' module-item'>
  78. <td><a class="fn" href="fn.string.html"
  79. title='fn syn::parse::string'>string</a></td>
  80. <td class='docblock-short'>
  81. </td>
  82. </tr>
  83. <tr class=' module-item'>
  84. <td><a class="fn" href="fn.tt.html"
  85. title='fn syn::parse::tt'>tt</a></td>
  86. <td class='docblock-short'>
  87. </td>
  88. </tr>
  89. <tr class=' module-item'>
  90. <td><a class="fn" href="fn.ty.html"
  91. title='fn syn::parse::ty'>ty</a></td>
  92. <td class='docblock-short'>
  93. </td>
  94. </tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "syn";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>