Write in front: Study notes from study Vue source code parsing series of courses _bilibili _bilibili. The library cannot be implemented with a simple regular expression approach

The simplest implementation of a template engine uses the repl() method in a regular expression. The second argument of the method can be a function that provides a parameter to the captured thing, which is $1. Combined with a Data object, you can achieve the most naive intelligent substitution

= = = =

Bottom tokens thought

The interview asked

(I also see this part of the cloud in the fog) first mark, later research.