Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

v4.2.0

Latest
Compare
Choose a tag to compare
@ncordon ncordon released this 29 Oct 13:07
· 1 commit to master since this release
  • Adds supported languages with aliases: supported_language_manifests method.
  • Adds server_version method to check out bblfshd version being used.
  • Adds default timeout of 60 seconds for parsing a file.
  • Removes CLI. If you are seeking for a terminal CLI check out our go-client
  • Solves a bug that crashed the python interpreter when decoding empty bytes: #189

Examples

import bblfsh

client = bblfsh.BblfshClient("localhost:9432")
# bblfshd version being used
client.server_version()
# supported languages with aliases
client.supported_language_manifests()

# Parse a file with no timeout
ctx = client.parse("file.py", mode=bblfsh.Modes.NATIVE, timeout = -1)
# Parse a file with 60 seconds timeout
ctx = client.parse("file.py", mode=bblfsh.Modes.NATIVE)
# Parse a file with 70 seconds tiemout
ctx = client.parse("file.py", mode=bblfsh.Modes.NATIVE, timeout = 70)