use-php-syntax 0.0.1

PHP syntax label primitives for RustUse.
Documentation
  • Coverage
  • 2.02%
    2 out of 99 items documented1 out of 14 items with examples
  • Size
  • Source code size: 8.24 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 818.37 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-php
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-php-syntax

PHP syntax label primitives for RustUse.

Experimental

use-php-syntax is experimental while use-php remains below 0.3.0.

Example

use use_php_syntax::{PhpDeclarationKind, PhpKeyword, PhpModifier, is_php_keyword};

assert!(is_php_keyword("class"));
assert_eq!(PhpKeyword::Readonly.as_str(), "readonly");
assert_eq!(PhpDeclarationKind::Trait.to_string(), "trait");
assert_eq!("final".parse::<PhpModifier>()?, PhpModifier::Final);
# Ok::<(), use_php_syntax::PhpSyntaxError>(())

Scope

  • PHP keyword, visibility, declaration, modifier, and control-flow labels.

Non-goals

  • PHP parsing, syntax trees, formatting, linting, or grammar validation.

License

Licensed under either Apache-2.0 or MIT.