Tree-sitter: a new parsing system for programming tools - GitHub Universe 2017

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ต.ค. 2024

ความคิดเห็น • 27

  • @axelforsman1642
    @axelforsman1642 5 ปีที่แล้ว +11

    So nice it makes you wonder why something like this hasn't existed up until now.

    • @smallsnippets
      @smallsnippets 3 ปีที่แล้ว +3

      I think many people had something like this in mind.... but didn't get their ass up!
      This guy did it!

    • @KristaSider
      @KristaSider หลายเดือนก่อน

      Pig​@@smallsnippets

  • @kerembaydogan5543
    @kerembaydogan5543 6 ปีที่แล้ว +16

    Sir, what you did at 13:30 was amazing. It shows the difference between fake and real parsing. It deserves an applause 👏

  • @blank001
    @blank001 3 ปีที่แล้ว +14

    VScode would become even more great if it just implement Tree-sitter for text grammar.

    • @shilangyu
      @shilangyu 2 ปีที่แล้ว

      still waiting for this

    • @elrisitas8508
      @elrisitas8508 ปีที่แล้ว

      emacs has it

    • @mndtr0
      @mndtr0 ปีที่แล้ว

      @@elrisitas8508 neovim

    • @elrisitas8508
      @elrisitas8508 ปีที่แล้ว

      @@mndtr0 neomeme

    • @mndtr0
      @mndtr0 ปีที่แล้ว

      @@elrisitas8508 ?

  • @g3i0r
    @g3i0r 6 ปีที่แล้ว +2

    Very impressive! Some questions:
    1. Can it handle multiple files in a project? Per-file compile flags?
    2. Can it handle function overloads? Inherited methods?
    3. Can it handle C++ templates? This should be pretty hard because C++ templates are not context-free.
    4. Can it do jump-to-implementation?

  • @michaelmalyshev8818
    @michaelmalyshev8818 3 ปีที่แล้ว +3

    This could be a very cool tool to implement refactoring algorithms. However, there is a fundamental problem with C code -- preprocessor. That would be nice to have a callback in the tokenizer (?) which looks up expanded macros and reuse them to parse the source but keep track of original source code locations

    • @PeterVerhas
      @PeterVerhas ปีที่แล้ว

      Even more with Rust that has a preprocessor which works on tokenized trees (something between lexical analysis and AST) and you can write preprocessor logic in Rust itself.

  • @alexa.davronov1537
    @alexa.davronov1537 4 ปีที่แล้ว +2

    I happened to come across this thing. I wonder how lexer/parser is generated. Where do I look for basic things?
    Table of content:
    2:04 Rationale behind creation of Tree-sitter
    10:05 What're we doing with Tree-sitter
    22:04 How it works

  • @tretretretre747
    @tretretretre747 4 ปีที่แล้ว +1

    Thanks for your presentation. I am learning tree-sitter but i have a problem. I am parsing a source code from file, i need to know his function name not the node name. how can i do that. I read all the doc but i can't have the solution. thanks

  • @3zdayz
    @3zdayz 6 ปีที่แล้ว +2

    Looks like a tool that could be leverages for transpiling too... C to javascript or vice versa....
    impressive though even just for syntax highlighting actually getting syntax instead of just keyword and string matches.

    • @forivall
      @forivall 5 ปีที่แล้ว +1

      yeah, after stumbling upon tree-sitter, i'm immediately planning to use it for the canonical parser for my alt-js language that i prototyped a few years ago, and havent worked on since (so the parser is woefully out of date, as the language is meant to keep up to date with modern js)

  • @soheilsalmani3405
    @soheilsalmani3405 ปีที่แล้ว

    So clear, thank you!

  • @josephlyons3393
    @josephlyons3393 6 ปีที่แล้ว +2

    Will Tree-Sitter make it easier for package developers to create packages for truly recognizing syntax errors within a language?

    • @VigneshD25
      @VigneshD25 4 ปีที่แล้ว

      I think it just came true after 2 years.

  • @wliaputs
    @wliaputs 6 ปีที่แล้ว

    Thanks mate!

  • @daniel55-hu9vd
    @daniel55-hu9vd ปีที่แล้ว

    Thank you max 😴👍👍👍👍🥴😬

  • @desmond-hawkins
    @desmond-hawkins 2 ปีที่แล้ว +1

    69ms to parse all of React? *nice.*

  • @MrDemultiplexer
    @MrDemultiplexer 2 ปีที่แล้ว +1

    RIP Atom

    • @sustrata9125
      @sustrata9125 2 ปีที่แล้ว

      I was gonna say the same. Then I found this ✝⚛😢

  • @KristaSider
    @KristaSider หลายเดือนก่อน

    Douchballs lol