This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// parse complex css selectors, such as 'div#my-id.my-class.another-class[foo=bar]' | |
// let parser = new ParseComplexSelector(); | |
// let selectors = parser.parse('div#my-id.my-class.another-class[foo=bar]') | |
// this will output: | |
// { | |
// tag: 'div', | |
// class: ['my-class', 'another-class'], | |
// attributes: { | |
// foo: bar | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 中缀表达式求职 | |
// leetcode 224 题 | |
// https://leetcode.com/problems/basic-calculator/ | |
/* | |
给你一个字符串表达式 s ,请你实现一个基本计算器来计算并返回它的值。 | |
示例 1: | |
输入:s = "1 + 1" | |
输出:2 |