GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs.rs
  • rustpython-parser-0.4.0
  • Permalink
  • Docs.rs crate page
  • MIT
  • Repository
  • crates.io
  • Source
  • coolreader18
  • windelbouwman
  • github:rustpython:packaging
  • is-macro ^0.3.0 normal
  • itertools ^0.11.0 normal
  • lalrpop-util ^0.20.0 normal

This view

  • Original page
  • New address

GeezerVison is showing docs.rs โ€” parse_expression in rustpython_parser - Rust

rustpython_parser

Function parse_expression 

Source
pub fn parse_expression(source: &str, path: &str) -> Result<Expr, ParseError>
๐Ÿ‘ŽDeprecated:

Use ast::Expr::parse from rustpython_parser::Parse trait.

Expand description

Parses a single Python expression.

This convenience function can be used to parse a single expression without having to specify the Mode or the location.

ยงExample

For example, parsing a single expression denoting the addition of two numbers:

use rustpython_parser as parser;
let expr = parser::parse_expression("1 + 2", "<embedded>");

assert!(expr.is_ok());
You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.