This article mainly introduces the jQuery selector source code explanation (5): The tokenize parsing process. This article uses a detailed comment to explain the parsing process of the tokenize method, need a friend can refer to the following analysis based on jQuery-1.10.2.js version.
$ ("P: not (. class: contain ('span '): eq (3) ") is used as an example to explain how
JQuery selector Code Description (5) -- describes the tokenize parsing process
The following uses $ (div: not (. class: contain ('span '): eq (3) as an example to illustrate how tokenize and preFilter complete parsing. For more information about each line of code in the tokenize method and preFilter class, see the following two articles:
The following is the so
JQuery selector Code Description (5) -- describes the tokenize parsing process, jquerytokenize
For Original Articles, please indicate the source. Thank you!
The following analysis is based on the jQuery-1.10.2.js version.
The following uses $ ("div: not (. class: contain ('span '): eq (3) ") is used as an example to explain how tokenize and preFilter complete parsing. For more information about each line of
The Expr.prefilter is a method for preprocessing attr, child, pseudo three selectors in the Tokenize method. As follows:
Expr.prefilter: {"ATTR": function (Match) {* * * * Complete the following tasks: * 1, property name decoding * 2, property value decoding * 3, if the judge is ~=, then add a space on both sides of the property value * 4, return the final Mtach object * * Match[1] represents the property name, * Match[1].replace (RuneScape, F
This article mainly introduces the jQuery selector source code (4): Expr of the tokenize method. preFilter. This article explains the Expr of the tokenize method in detail. the source code of the preFilter implementation. For more information, see Expr. preFilter is a preprocessing method for ATTR, CHILD, and PSEUDO selectors in the tokenize method. The details a
This article mainly introduces the jQuery selector source code (4): Expr of the tokenize method. preFilter. This article explains the Expr of the tokenize method in detail. the source code of the preFilter implementation. For more information, see Expr. preFilter is a preprocessing method for ATTR, CHILD, and PSEUDO selectors in the tokenize method. The details a
JQuery selector source code explanation (5): tokenize parsing process, jquerytokenize
The following analysis is based on the jQuery-1.10.2.js version.
The following uses $ ("div: not (. class: contain ('span '): eq (3) ") is used as an example to explain how tokenize and preFilter complete parsing. For more information about each line of code in the tokenize meth
JQuery selector code (3) -- tokenize method, jquerytokenize
Original article. Please indicate the source for reprinting. Thank you!
/** The tokenize method is the core function of selector parsing, which converts the selector into two-level array groups * example: * If the selector is "div. class, span, the parsed result is: * group [0] [0] = {type: 'tag', value: 'div ', matches: match} * group [0] [1] = {
JQuery selector source code (4): Expr. preFilter and jquerytokenize of the tokenize Method
Expr. preFilter is a preprocessing method for ATTR, CHILD, and PSEUDO selectors in the tokenize method. The details are as follows:
Expr. preFilter: {"ATTR": function (match) {/** to complete the following tasks: * 1. attribute name decoding * 2. Attribute Value decoding * 3. If the judgment character is ~ =, A space
The following analysis is based on the jquery-1.10.2.js version.
The following is an example of $ ("Div:not (. Class:contain (' span ')): eq (3)") to illustrate how the Tokenize and prefilter sections of code coordinate to complete the parsing. For a detailed explanation of each line of code for the Tokenize method and the Prefilter class, see the following two articles:
Http://www.jb51.net/article/63155.
The * * Tokenize method is the core function of the selector resolution, which converts the selector to a two-level array groups * For example: * If the selector is "Div.class,span", then the result of parsing is: * Group[0][0] = {type: ' TAG ', V Alue: ' div ', matches:match} * group[0][1] = {type: ' class ', Value: '. Class ', Matches:match} * group[1][0] = {type: ' TAG ', Valu E: ' span ', matches:match} * by the above results, we can see that each
When compiling lexer or parser, except lexer and parser, tokenize and tokenizer often appear, basically all source code that involves lexical parsing will use tokenize.
It is named by developers who use English. Otherwise, the name may be replaced by other simple words and will not be visualized, therefore, different languages and cultures may lead to different ways of thinking. Therefore, Chinese people's
JQuery selector source code (3): tokenize method, jquerytokenize
/** The tokenize method is the core function of selector parsing, which converts the selector into two-level array groups * example: * If the selector is "div. class, span, the parsed result is: * group [0] [0] = {type: 'tag', value: 'div ', matches: match} * group [0] [1] = {type: 'class', value :'. class ', matches: match} * group [1] [0] =
Original articles, reproduced please specify the source, thank you!/* * The Tokenize function is the core function of the selector resolution, which converts the selector to a two-level array groups * Example: * If the selector is "Div.class,span", then the parsed result is: * group[0][0] = {type: ' TAG ', Value: ' div ', matches:match} * group[0][1] = {type: ' class ', Value: '. Class ', Matches:match} * group[1][0] = {type: ' TAG ' , value: ' Span '
The cstring: tokenize () and afxextractsubstring () functions are used to intercept strings with specific delimiters. Some differences are worth noting.
Cstringt tokenize (pcxstr psztokens, Int istart) const;
Bool afxapi afxextractsubstring (cstring rstring, lpctstr lpszfullstring, int isubstring, tchar chsep = '\ n ');
Cstring: pcxstr psztokens in tokenize
PIP installation tool times wrong reminder: Command "/usr/bin/python-u-C" Import setuptools, tokenize;__file__= '/tmp/pip-build-f8m_zq/statsmod
The reason is that you need to crawl the Web page to process HTTPS when you install the toolkit, while processing HTTPS relies on the decryption algorithm (i.e. the cryptography packet), and the cryptography relies on the Fourier transform algorithm and the corresponding compilation environment. Ubuntu 16.04
only be used within a function are called "local variables".Note: The var keyword is omitted anywhere, and the variables defined are "global variables" (which can be used outside of the function) so, in general, do not omit the var keyword.Assignment Value and assignment address:Assignment value: Used to assign a basic data type (only one value) to a variable.Reference address: Used to assign a composite data type (possibly with multiple values) to a variable. All two variables change at the sa
To write a good C language, a beautiful macro definition is very important. Macro definitions can help us prevent errors, improve code portability and readability, and more.In the software development process, there are often common or common functions or code snippets that can be written as functions or encapsulated as macro definitions. So is the function good or the macro definition good? This requires u
Address: http://wt.vankeweekly.com/blog/%B4%F3%CA% AB /articles/11884.html
Causal relationship, inus definition, and suppes Definition
We know that causal relationships are very important for us to think about any problem and do anything. Many people even think that the causal association ability of talent is one of the first conditions for human beings to become a "Everlasting thing. In philosophy, there a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.